From 54922daa34b041d05d7e3d624a7d764fb43f6f51 Mon Sep 17 00:00:00 2001 From: Grant Arnold Date: Tue, 2 May 2023 00:23:14 +0000 Subject: [PATCH] Update FME Server to FME Flow. --- .github/workflows/release.yaml | 36 ++++++------- .github/workflows/tests.yaml | 2 +- .vscode/tasks.json | 10 ++-- Dockerfile | 6 +-- README.md | 16 +++--- cmd/backup.go | 8 +-- cmd/backup_test.go | 2 +- cmd/cancel.go | 10 ++-- cmd/deploymentparameters.go | 8 +-- cmd/deploymentparameters_create.go | 4 +- cmd/deploymentparameters_delete.go | 6 +-- cmd/deploymentparameters_update.go | 4 +- cmd/engines.go | 10 ++-- cmd/engines_test.go | 12 ++--- cmd/functions.go | 24 ++++----- cmd/healthcheck.go | 24 ++++----- cmd/healthcheck_test.go | 6 +-- cmd/info.go | 12 ++--- cmd/info_test.go | 2 +- cmd/jobs.go | 14 +++--- cmd/licenseStatus.go | 2 +- cmd/login.go | 16 +++--- cmd/login_test.go | 2 +- cmd/machinekey.go | 2 +- cmd/migrationTasks.go | 18 +++---- cmd/projects.go | 10 ++-- cmd/projects_download.go | 6 +-- cmd/projects_download_test.go | 2 +- cmd/projects_upload.go | 6 +-- cmd/projects_upload_test.go | 2 +- cmd/refresh.go | 6 +-- cmd/refreshStatus.go | 8 +-- cmd/repositories.go | 50 +++++++++---------- cmd/repositories_create.go | 12 ++--- cmd/repositories_delete.go | 10 ++-- cmd/request.go | 8 +-- cmd/requestStatus.go | 8 +-- cmd/requestfile.go | 6 +-- cmd/restore.go | 12 ++--- cmd/restore_test.go | 2 +- cmd/root.go | 8 +-- cmd/run.go | 16 +++--- cmd/systemcode.go | 2 +- cmd/testFunctions.go | 6 +-- cmd/workspaces.go | 46 ++++++++--------- cmd/workspaces_test.go | 4 +- docgen/docgen.go | 2 +- docs/custom-columns.md | 14 +++--- docs/fmeserver.md | 38 +++++++------- docs/fmeserver_backup.md | 12 ++--- docs/fmeserver_cancel.md | 10 ++-- docs/fmeserver_completion.md | 16 +++--- docs/fmeserver_completion_bash.md | 14 +++--- docs/fmeserver_completion_fish.md | 12 ++--- docs/fmeserver_completion_powershell.md | 10 ++-- docs/fmeserver_completion_zsh.md | 14 +++--- docs/fmeserver_deploymentparameters.md | 20 ++++---- docs/fmeserver_deploymentparameters_create.md | 10 ++-- docs/fmeserver_deploymentparameters_delete.md | 12 ++--- docs/fmeserver_deploymentparameters_update.md | 10 ++-- docs/fmeserver_engines.md | 16 +++--- docs/fmeserver_healthcheck.md | 24 ++++----- docs/fmeserver_info.md | 14 +++--- docs/fmeserver_jobs.md | 20 ++++---- docs/fmeserver_license.md | 18 +++---- docs/fmeserver_license_machinekey.md | 8 +-- docs/fmeserver_license_refresh.md | 12 ++--- docs/fmeserver_license_refresh_status.md | 14 +++--- docs/fmeserver_license_request.md | 14 +++--- docs/fmeserver_license_request_status.md | 14 +++--- docs/fmeserver_license_requestfile.md | 12 ++--- docs/fmeserver_license_status.md | 8 +-- docs/fmeserver_license_systemcode.md | 8 +-- docs/fmeserver_login.md | 14 +++--- docs/fmeserver_migration.md | 8 +-- docs/fmeserver_migration_tasks.md | 20 ++++---- docs/fmeserver_projects.md | 16 +++--- docs/fmeserver_projects_download.md | 12 ++--- docs/fmeserver_projects_upload.md | 12 ++--- docs/fmeserver_repositories.md | 22 ++++---- docs/fmeserver_repositories_create.md | 12 ++--- docs/fmeserver_repositories_delete.md | 12 ++--- docs/fmeserver_restore.md | 16 +++--- docs/fmeserver_run.md | 20 ++++---- docs/fmeserver_workspaces.md | 20 ++++---- go.mod | 2 +- main.go | 2 +- 87 files changed, 525 insertions(+), 525 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2b117b5..6f4737b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,13 +37,13 @@ jobs: run: | export GOOS=${{ matrix.os }} export GOARCH=${{ matrix.arch }} - CGO_ENABLED=0 go build -o fmeserver${{ matrix.exe-ext }} -ldflags="-X \"github.com/safesoftware/fmeserver-cli/cmd.appVersion=${{ env.APP_VERSION }}\"" + CGO_ENABLED=0 go build -o fmeflow${{ matrix.exe-ext }} -ldflags="-X \"github.com/safesoftware/fmeflow-cli/cmd.appVersion=${{ env.APP_VERSION }}\"" - name: Upload artifact for later steps uses: actions/upload-artifact@v3 with: - name: fmeserver-${{ matrix.os }}-${{ matrix.arch }} - path: fmeserver${{ matrix.exe-ext }} + name: fmeflow-${{ matrix.os }}-${{ matrix.arch }} + path: fmeflow${{ matrix.exe-ext }} if-no-files-found: error build-docker: @@ -67,7 +67,7 @@ jobs: with: context: . push: true - tags: safesoftware/fmeserver-cli:${{ env.APP_VERSION }}, safesoftware/fmeserver-cli:latest + tags: safesoftware/fmeflow-cli:${{ env.APP_VERSION }}, safesoftware/fmeflow-cli:latest platforms: linux/amd64,linux/arm64 build-args: | APP_VERSION=${{ env.APP_VERSION }} @@ -80,7 +80,7 @@ jobs: - name: Download uses: actions/download-artifact@v3 with: - name: fmeserver-windows-amd64 + name: fmeflow-windows-amd64 - name: Sign env: @@ -91,13 +91,13 @@ jobs: $buffer = [System.Convert]::FromBase64String($env:SIGNCERT) # Create new certificate object from the buffer and the certificate pass $certificate = [System.Security.Cryptography.X509Certificates.X509Certificate2]::New($buffer, $env:CERTPASS) - Set-AuthenticodeSignature -HashAlgorithm SHA256 -Certificate $certificate -TimestampServer http://timestamp.digicert.com -FilePath fmeserver.exe + Set-AuthenticodeSignature -HashAlgorithm SHA256 -Certificate $certificate -TimestampServer http://timestamp.digicert.com -FilePath fmeflow.exe - name: Reupload artifact uses: actions/upload-artifact@v3 with: - name: fmeserver-windows-amd64 - path: fmeserver.exe + name: fmeflow-windows-amd64 + path: fmeflow.exe sign-macosx: name: Sign Mac Binaries @@ -112,7 +112,7 @@ jobs: - name: Download uses: actions/download-artifact@v3 with: - name: fmeserver-${{ matrix.os }}-${{ matrix.arch }} + name: fmeflow-${{ matrix.os }}-${{ matrix.arch }} - name: Codesign binaries # Extract the secrets @@ -138,7 +138,7 @@ jobs: # We finally codesign our app bundle, specifying the Hardened runtime option - /usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" --options runtime fmeserver -v + /usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" --options runtime fmeflow -v - name: "Notarize executable" # Extract the secrets we defined earlier as environment variables @@ -158,7 +158,7 @@ jobs: # notarization service echo "Creating temp notarization archive" - ditto -c -k --keepParent "fmeserver" "notarization.zip" + ditto -c -k --keepParent "fmeflow" "notarization.zip" # Here we send the notarization request to the Apple's Notarization service, waiting for the result. # This typically takes a few seconds inside a CI environment, but it might take more depending on the App @@ -171,8 +171,8 @@ jobs: - name: Reupload artifact uses: actions/upload-artifact@v3 with: - name: fmeserver-${{ matrix.os }}-${{ matrix.arch }} - path: fmeserver + name: fmeflow-${{ matrix.os }}-${{ matrix.arch }} + path: fmeflow compress-files: name: Compress binaries and release @@ -204,7 +204,7 @@ jobs: - name: Download uses: actions/download-artifact@v3 with: - name: fmeserver-${{ matrix.os }}-${{ matrix.arch }} + name: fmeflow-${{ matrix.os }}-${{ matrix.arch }} path: release - name: Copy license files for inclusion in zip package @@ -218,13 +218,13 @@ jobs: with: type: ${{ matrix.type }} directory: release - filename: ../fmeserver-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.zip-ext }} + filename: ../fmeflow-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.zip-ext }} - name: Calculate MD5 hash run: | - MD5_SUM=$(md5sum fmeserver-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.zip-ext }} | cut -d ' ' -f 1) - echo ${MD5_SUM} >fmeserver-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.zip-ext }}.md5 - cat fmeserver-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.zip-ext }}.md5 + MD5_SUM=$(md5sum fmeflow-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.zip-ext }} | cut -d ' ' -f 1) + echo ${MD5_SUM} >fmeflow-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.zip-ext }}.md5 + cat fmeflow-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.zip-ext }}.md5 # Add compressed files and md5 hashes to the release - uses: AButler/upload-release-assets@v2.0 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d662f63..d1e5ace 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -19,7 +19,7 @@ jobs: go-version: 1.19 - name: Test build - run: CGO_ENABLED=0 go build -o fmeserver -ldflags="-X \"github.com/safesoftware/fmeserver-cli/cmd.appVersion=$(echo ${GITHUB_REF} | rev | cut -d'/' -f 1 | rev )\"" + run: CGO_ENABLED=0 go build -o fmeflow -ldflags="-X \"github.com/safesoftware/fmeflow-cli/cmd.appVersion=$(echo ${GITHUB_REF} | rev | cut -d'/' -f 1 | rev )\"" - name: Run tests run: go test ./... \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 9df94f3..77389ec 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -8,18 +8,18 @@ "command": "go", "args": [ "build", - "-ldflags=\\\"-X github.com/safesoftware/fmeserver-cli/cmd.appVersion=$(git rev-parse --short HEAD)\\\"", + "-ldflags=\\\"-X github.com/safesoftware/fmeflow-cli/cmd.appVersion=$(git rev-parse --short HEAD)\\\"", "-o", - "fmeserver.exe" + "fmeflow.exe" ] }, "linux": { "command": "go", "args": [ "build", - "-ldflags=\"-X github.com/safesoftware/fmeserver-cli/cmd.appVersion=$(git rev-parse --short HEAD)\"", + "-ldflags=\"-X github.com/safesoftware/fmeflow-cli/cmd.appVersion=$(git rev-parse --short HEAD)\"", "-o", - "fmeserver" + "fmeflow" ] }, "problemMatcher": [], @@ -31,7 +31,7 @@ { "label": "Build Docker Image", "type": "shell", - "command": "docker build -t safesoftware/fmeserver-cli .", + "command": "docker build -t safesoftware/fmeflow-cli .", "group": { "kind": "build" } diff --git a/Dockerfile b/Dockerfile index 80ae999..01cc092 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /app COPY . . # Build the executable -RUN CGO_ENABLED=0 go build -o fmeserver -ldflags="-X \"github.com/safesoftware/fmeserver-cli/cmd.appVersion=${APP_VERSION}\"" +RUN CGO_ENABLED=0 go build -o fmeflow -ldflags="-X \"github.com/safesoftware/fmeflow-cli/cmd.appVersion=${APP_VERSION}\"" # Use distroless for final image FROM gcr.io/distroless/static:nonroot @@ -17,7 +17,7 @@ FROM gcr.io/distroless/static:nonroot USER nonroot:nonroot # copy compiled app -COPY --from=build --chown=nonroot:nonroot /app/fmeserver /fmeserver +COPY --from=build --chown=nonroot:nonroot /app/fmeflow /fmeflow # run -ENTRYPOINT ["/fmeserver"] \ No newline at end of file +ENTRYPOINT ["/fmeflow"] \ No newline at end of file diff --git a/README.md b/README.md index 23403a4..383f8e0 100644 --- a/README.md +++ b/README.md @@ -10,26 +10,26 @@ This is a command line interface that utilizes the FME Server REST API to intera ### Installing -* Simply download the binary for your system from the [releases](https://github.com/safesoftware/fmeserver-cli/releases) page and extract it. -* On Unix systems, you may need to give the file execute permissions (e.g. `chmod +x fmeserver`). You can move the executable to a desired location (e.g. `mv fmeserver /usr/local/bin/fmeserver`) +* Simply download the binary for your system from the [releases](https://github.com/safesoftware/fmeflow-cli/releases) page and extract it. +* On Unix systems, you may need to give the file execute permissions (e.g. `chmod +x fmeflow`). You can move the executable to a desired location (e.g. `mv fmeflow /usr/local/bin/fmeflow`) ### Executing program * Execute the program to get a high level overview of each command ``` -fmeserver +fmeflow ``` * Log in to an existing FME Server. It is recommended to generate an API token using the FME Server Web UI initially and use that to log in. ``` -fmeserver login https://my-fmeserver.com --token my-token-here +fmeflow login https://my-fmeflow.com --token my-token-here ``` -* Your token and URL will be saved to a config file located in $HOME/.fmeserver-cli.yaml. Config file location can be overridden with the `--config` flag +* Your token and URL will be saved to a config file located in $HOME/.fmeflow-cli.yaml. Config file location can be overridden with the `--config` flag * Test your credentials work ``` -fmeserver info +fmeflow info ``` -For full documentation of all commands, see the [Documentation](docs/fmeserver.md). +For full documentation of all commands, see the [Documentation](docs/fmeflow.md). ## Development @@ -40,7 +40,7 @@ go run main.go ``` * Build binary ``` -go build -o fmeserver +go build -o fmeflow ``` A great resource for adding new structs to represent JSON returned from FME Server is this [JSON to Go converter](https://mholt.github.io/json-to-go/) which will create a Go struct for you from a JSON sample. diff --git a/cmd/backup.go b/cmd/backup.go index f6d6a77..0ffb091 100644 --- a/cmd/backup.go +++ b/cmd/backup.go @@ -41,10 +41,10 @@ func newBackupCmd() *cobra.Command { }, Example: ` # back up to a local file - fmeserver backup -f my_local_backup.fsconfig + fmeflow backup -f my_local_backup.fsconfig # back up to the "Backup" folder in the FME Server Shared Resources with the file name my_fme_backup.fsconfig - fmeserver backup --resource --export-package my_fme_backup.fsconfig`, + fmeflow backup --resource --export-package my_fme_backup.fsconfig`, Args: NoArgs, RunE: backupRun(&f), } @@ -84,7 +84,7 @@ func backupRun(f *backupFlags) func(cmd *cobra.Command, args []string) error { "exportPackageName": {f.outputBackupFile}, } - request, err := buildFmeServerRequest("/fmerest/v3/migration/backup/download", "POST", strings.NewReader(data.Encode())) + request, err := buildFmeFlowRequest("/fmerest/v3/migration/backup/download", "POST", strings.NewReader(data.Encode())) if err != nil { return err } @@ -132,7 +132,7 @@ func backupRun(f *backupFlags) func(cmd *cobra.Command, args []string) error { data.Add("failureTopic", f.backupFailureTopic) } - request, err := buildFmeServerRequest("/fmerest/v3/migration/backup/resource", "POST", strings.NewReader(data.Encode())) + request, err := buildFmeFlowRequest("/fmerest/v3/migration/backup/resource", "POST", strings.NewReader(data.Encode())) if err != nil { return err } diff --git a/cmd/backup_test.go b/cmd/backup_test.go index 1422764..0d168cd 100644 --- a/cmd/backup_test.go +++ b/cmd/backup_test.go @@ -13,7 +13,7 @@ func TestBackup(t *testing.T) { okResponseV3 := `Random file contents` // generate random file to back up to - f, err := os.CreateTemp("", "*fmeserver-backup.fsconfig") + f, err := os.CreateTemp("", "*fmeflow-backup.fsconfig") require.NoError(t, err) defer os.Remove(f.Name()) // clean up diff --git a/cmd/cancel.go b/cmd/cancel.go index 46f4f12..812eb36 100644 --- a/cmd/cancel.go +++ b/cmd/cancel.go @@ -33,7 +33,7 @@ func newCancelCmd() *cobra.Command { Long: `Cancels the job and marks it as aborted in the completed jobs section, but does not remove it from the database.`, Example: ` # Cancel a job with id 42 - fmeserver cancel --id 42 + fmeflow cancel --id 42 `, Args: NoArgs, RunE: runCancel(&f), @@ -56,8 +56,8 @@ func runCancel(f *cancelFlags) func(cmd *cobra.Command, args []string) error { // get build to decide if we should use v3 or v4 // FME Server 2022.0 and later can use v4. Otherwise fall back to v3 if f.apiVersion == "" { - fmeserverBuild := viper.GetInt("build") - if fmeserverBuild < cancelV4BuildThreshold { + fmeflowBuild := viper.GetInt("build") + if fmeflowBuild < cancelV4BuildThreshold { f.apiVersion = apiVersionFlagV3 } else { f.apiVersion = apiVersionFlagV4 @@ -67,7 +67,7 @@ func runCancel(f *cancelFlags) func(cmd *cobra.Command, args []string) error { if f.apiVersion == "v4" { endpoint := "/fmeapiv4/jobs/" + f.id + "/cancel" - request, err := buildFmeServerRequest(endpoint, "POST", nil) + request, err := buildFmeFlowRequest(endpoint, "POST", nil) if err != nil { return err } @@ -114,7 +114,7 @@ func runCancel(f *cancelFlags) func(cmd *cobra.Command, args []string) error { } else if f.apiVersion == "v3" { // call the status endpoint to see if it is finished - request, err := buildFmeServerRequest("/fmerest/v3/transformations/jobs/running/"+f.id, "DELETE", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/transformations/jobs/running/"+f.id, "DELETE", nil) if err != nil { return err } diff --git a/cmd/deploymentparameters.go b/cmd/deploymentparameters.go index 292cd73..a94428a 100644 --- a/cmd/deploymentparameters.go +++ b/cmd/deploymentparameters.go @@ -45,13 +45,13 @@ func newDeploymentParametersCmd() *cobra.Command { Example: ` Examples: # List all deployment parameters - fmeserver deploymentparameters + fmeflow deploymentparameters # List a single deployment parameter - fmeserver deploymentparameters --name testParameter + fmeflow deploymentparameters --name testParameter # Output all deploymentparameters in json format - fmeserver deploymentparameters --json`, + fmeflow deploymentparameters --json`, Args: NoArgs, RunE: deploymentParametersRun(&f), } @@ -84,7 +84,7 @@ func deploymentParametersRun(f *deploymentparametersFlags) func(cmd *cobra.Comma // add the repository name to the request if specified url = url + "/" + f.name } - request, err := buildFmeServerRequest(url, "GET", nil) + request, err := buildFmeFlowRequest(url, "GET", nil) if err != nil { return err } diff --git a/cmd/deploymentparameters_create.go b/cmd/deploymentparameters_create.go index f17ca23..66fbd90 100644 --- a/cmd/deploymentparameters_create.go +++ b/cmd/deploymentparameters_create.go @@ -32,7 +32,7 @@ func newDeploymentParameterCreateCmd() *cobra.Command { Example: ` Examples: # Create a deployment parameter with the name "myParam" and the value "myValue" - fmeserver deploymentparameters create --name myParam --value myValue + fmeflow deploymentparameters create --name myParam --value myValue `, Args: NoArgs, @@ -64,7 +64,7 @@ func deploymentParametersCreateRun(f *deploymentParameterCreateFlags) func(cmd * return err } - request, err := buildFmeServerRequest("/fmeapiv4/deploymentparameters", "POST", bytes.NewBuffer(jsonData)) + request, err := buildFmeFlowRequest("/fmeapiv4/deploymentparameters", "POST", bytes.NewBuffer(jsonData)) if err != nil { return err } diff --git a/cmd/deploymentparameters_delete.go b/cmd/deploymentparameters_delete.go index 2eb9a90..878f308 100644 --- a/cmd/deploymentparameters_delete.go +++ b/cmd/deploymentparameters_delete.go @@ -25,10 +25,10 @@ func newDeploymentParameterDeleteCmd() *cobra.Command { Example: ` Examples: # Delete adeployment parameter with the name "myParam" - fmeserver deploymentparameters delete --name myParam + fmeflow deploymentparameters delete --name myParam # Delete a repository with the name "myRepository" and no confirmation - fmeserver deploymentparameters delete --name myParam --no-prompt + fmeflow deploymentparameters delete --name myParam --no-prompt `, Args: NoArgs, RunE: deploymentParameterDeleteRun(&f), @@ -58,7 +58,7 @@ func deploymentParameterDeleteRun(f *deploymentParameterDeleteFlags) func(cmd *c } } - request, err := buildFmeServerRequest("/fmeapiv4/deploymentparameters/"+f.name, "DELETE", nil) + request, err := buildFmeFlowRequest("/fmeapiv4/deploymentparameters/"+f.name, "DELETE", nil) if err != nil { return err } diff --git a/cmd/deploymentparameters_update.go b/cmd/deploymentparameters_update.go index 6b60757..d06ce88 100644 --- a/cmd/deploymentparameters_update.go +++ b/cmd/deploymentparameters_update.go @@ -29,7 +29,7 @@ func newDeploymentParameterUpdateCmd() *cobra.Command { Example: ` Examples: # Update a deployment parameter with the name "myParam" and the value "myValue" - fmeserver deploymentparameters update --name myParam --value myValue + fmeflow deploymentparameters update --name myParam --value myValue `, Args: NoArgs, @@ -56,7 +56,7 @@ func deploymentParametersUpdateRun(f *deploymentParameterUpdateFlags) func(cmd * return err } - request, err := buildFmeServerRequest("/fmeapiv4/deploymentparameters/"+f.name, "PUT", bytes.NewBuffer(jsonData)) + request, err := buildFmeFlowRequest("/fmeapiv4/deploymentparameters/"+f.name, "PUT", bytes.NewBuffer(jsonData)) if err != nil { return err } diff --git a/cmd/engines.go b/cmd/engines.go index bfceed6..8bce236 100644 --- a/cmd/engines.go +++ b/cmd/engines.go @@ -52,16 +52,16 @@ func newEnginesCmd() *cobra.Command { Long: "Gets information and status about FME Engines currently connected to FME Server", Example: ` # List all engines - fmeserver engines + fmeflow engines # Output number of engines - fmeserver engines --count + fmeflow engines --count # Output engines in json form - fmeserver engines --json + fmeflow engines --json # Output just the names of the engines with no column headers - fmeserver engines --output=custom-columns=NAME:.instanceName --no-headers`, + fmeflow engines --output=custom-columns=NAME:.instanceName --no-headers`, Args: NoArgs, RunE: enginesRun(&f), } @@ -85,7 +85,7 @@ func enginesRun(f *engineFlags) func(cmd *cobra.Command, args []string) error { client := &http.Client{} // call the status endpoint to see if it is finished - request, err := buildFmeServerRequest("/fmerest/v3/transformations/engines", "GET", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/transformations/engines", "GET", nil) if err != nil { return err } diff --git a/cmd/engines_test.go b/cmd/engines_test.go index 0755ce0..d1a2d5b 100644 --- a/cmd/engines_test.go +++ b/cmd/engines_test.go @@ -26,7 +26,7 @@ func TestEngines(t *testing.T) { "23166", "linux-x64" ], - "engineManagerNodeName": "fmeservercore", + "engineManagerNodeName": "fmeflowcore", "maxTransactionResultFailure": 10, "type": "STANDARD", "buildNumber": 23166, @@ -59,7 +59,7 @@ func TestEngines(t *testing.T) { "23166", "linux-x64" ], - "engineManagerNodeName": "fmeservercore", + "engineManagerNodeName": "fmeflowcore", "maxTransactionResultFailure": 10, "type": "STANDARD", "buildNumber": 23166, @@ -84,7 +84,7 @@ func TestEngines(t *testing.T) { "23166", "linux-x64" ], - "engineManagerNodeName": "fmeservercore", + "engineManagerNodeName": "fmeflowcore", "maxTransactionResultFailure": 10, "type": "STANDARD", "buildNumber": 23166, @@ -109,7 +109,7 @@ func TestEngines(t *testing.T) { "23166", "linux-x64" ], - "engineManagerNodeName": "fmeservercore", + "engineManagerNodeName": "fmeflowcore", "maxTransactionResultFailure": 10, "type": "STANDARD", "buildNumber": 23166, @@ -134,7 +134,7 @@ func TestEngines(t *testing.T) { "23166", "linux-x64" ], - "engineManagerNodeName": "fmeservercore", + "engineManagerNodeName": "fmeflowcore", "maxTransactionResultFailure": 10, "type": "STANDARD", "buildNumber": 23166, @@ -207,7 +207,7 @@ func TestEngines(t *testing.T) { statusCode: http.StatusOK, body: responseV3FourEngines, args: []string{"engines", "--output=custom-columns=ENGINEMANAGER:.engineManagerNodeName,TRANSACTIONPORT:.transactionPort,CURRENTJOB:.currentJobID"}, - wantOutputRegex: "[\\s]*ENGINEMANAGER[\\s]*TRANSACTIONPORT[\\s]*CURRENTJOB[\\s]*fmeservercore[\\s]*40935[\\s]*-1[\\s]*fmeservercore[\\s]*36883[\\s]*-1[\\s]*fmeservercore[\\s]*44089[\\s]*-1[\\s]*fmeservercore[\\s]*44795[\\s]*-1", + wantOutputRegex: "[\\s]*ENGINEMANAGER[\\s]*TRANSACTIONPORT[\\s]*CURRENTJOB[\\s]*fmeflowcore[\\s]*40935[\\s]*-1[\\s]*fmeflowcore[\\s]*36883[\\s]*-1[\\s]*fmeflowcore[\\s]*44089[\\s]*-1[\\s]*fmeflowcore[\\s]*44795[\\s]*-1", }, } diff --git a/cmd/functions.go b/cmd/functions.go index f20f028..edc1a3c 100644 --- a/cmd/functions.go +++ b/cmd/functions.go @@ -35,14 +35,14 @@ var defaultStyle = table.Style{ }, } -func buildFmeServerRequest(endpoint string, method string, body io.Reader) (http.Request, error) { +func buildFmeFlowRequest(endpoint string, method string, body io.Reader) (http.Request, error) { // retrieve url and token - fmeserverUrl := viper.GetString("url") - fmeserverToken := viper.GetString("token") + fmeflowUrl := viper.GetString("url") + fmeflowToken := viper.GetString("token") - req, err := http.NewRequest(method, fmeserverUrl+endpoint, body) - if fmeserverToken != "" { - req.Header.Set("Authorization", "fmetoken token="+fmeserverToken) + req, err := http.NewRequest(method, fmeflowUrl+endpoint, body) + if fmeflowToken != "" { + req.Header.Set("Authorization", "fmetoken token="+fmeflowToken) } return *req, err } @@ -175,25 +175,25 @@ func checkConfigFile(requireToken bool) error { if err != nil { return fmt.Errorf("could not open the config file " + viper.ConfigFileUsed() + ". Have you called the login command? ") } - fmeserverUrl := viper.GetString("url") + fmeflowUrl := viper.GetString("url") // check the fme server URL is valid - _, err = url.ParseRequestURI(fmeserverUrl) + _, err = url.ParseRequestURI(fmeflowUrl) if err != nil { return fmt.Errorf("invalid FME Server url in config file " + viper.ConfigFileUsed() + ". Have you called the login command? ") } if requireToken { // check there is a token to use for auth - fmeserverToken := viper.GetString("token") - if fmeserverToken == "" { + fmeflowToken := viper.GetString("token") + if fmeflowToken == "" { return fmt.Errorf("no token found in config file " + viper.ConfigFileUsed() + ". Have you called the login command? ") } } // check there is a build set in the config file - fmeserverBuild := viper.GetString("build") - if fmeserverBuild == "" { + fmeflowBuild := viper.GetString("build") + if fmeflowBuild == "" { return fmt.Errorf("no build found in config file " + viper.ConfigFileUsed() + ". Have you called the login command? ") } return nil diff --git a/cmd/healthcheck.go b/cmd/healthcheck.go index a6b8ad7..044e413 100644 --- a/cmd/healthcheck.go +++ b/cmd/healthcheck.go @@ -42,26 +42,26 @@ func newHealthcheckCmd() *cobra.Command { Long: "Retrieves the health status of FME Server. The health status is normal if the FME Server REST API is responsive. Note that this endpoint does not require authentication. This command can be used without calling the login command first. The FME Server url can be passed in using the --url flag without needing a config file. A config file without a token can also be used.", Example: ` # Check if the FME Server is healthy and accepting requests - fmeserver healthcheck + fmeflow healthcheck # Check if the FME Server is healthy and ready to process jobs - fmeserver healthcheck --ready + fmeflow healthcheck --ready # Check if the FME Server is healthy and output in json - fmeserver healthcheck --json + fmeflow healthcheck --json # Check that the FME Server is healthy and output just the status - fmeserver healthcheck --output=custom-columns=STATUS:.status + fmeflow healthcheck --output=custom-columns=STATUS:.status # Check the FME Server is healthy without needing a config file - fmeserver healthcheck --url https://my-fmeserver.internal + fmeflow healthcheck --url https://my-fmeflow.internal # Check the FME Server is healthy with a manually created config file - cat << EOF >fmeserver-cli.yaml + cat << EOF >fmeflow-cli.yaml build: 23235 - url: https://my-fmeserver.internal + url: https://my-fmeflow.internal EOF - fmeserver healthcheck --config fmeserver-cli.yaml`, + fmeflow healthcheck --config fmeflow-cli.yaml`, Args: NoArgs, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { // only check config if we didn't specify a url @@ -105,8 +105,8 @@ func healthcheckRun(f *healthcheckFlags) func(cmd *cobra.Command, args []string) // FME Server 2023.0 and later can use v4. Otherwise fall back to v3 // If called without a config file and thus no build number, default to v3 if f.apiVersion == "" { - fmeserverBuild := viper.GetInt("build") - if fmeserverBuild < healthcheckV4BuildThreshold { + fmeflowBuild := viper.GetInt("build") + if fmeflowBuild < healthcheckV4BuildThreshold { f.apiVersion = apiVersionFlagV3 } else { f.apiVersion = apiVersionFlagV4 @@ -126,7 +126,7 @@ func healthcheckRun(f *healthcheckFlags) func(cmd *cobra.Command, args []string) viper.Set("url", f.url) } - request, err := buildFmeServerRequest(endpoint, "GET", nil) + request, err := buildFmeFlowRequest(endpoint, "GET", nil) if err != nil { return err } @@ -207,7 +207,7 @@ func healthcheckRun(f *healthcheckFlags) func(cmd *cobra.Command, args []string) viper.Set("url", f.url) } - request, err := buildFmeServerRequest(endpoint, "GET", nil) + request, err := buildFmeFlowRequest(endpoint, "GET", nil) if err != nil { return err diff --git a/cmd/healthcheck_test.go b/cmd/healthcheck_test.go index cc81584..8f2c211 100644 --- a/cmd/healthcheck_test.go +++ b/cmd/healthcheck_test.go @@ -67,7 +67,7 @@ func TestHealthcheck(t *testing.T) { statusCode: http.StatusOK, body: okResponseV3, wantOutputRegex: "^ok\n$", - fmeserverBuild: 22765, + fmeflowBuild: 22765, args: []string{"healthcheck"}, }, { @@ -75,7 +75,7 @@ func TestHealthcheck(t *testing.T) { statusCode: http.StatusOK, body: okResponseV4, wantOutputRegex: "STATUS[\\s]*MESSAGE[\\s]*[\\s]*ok[\\s]*FME Server is healthy", - fmeserverBuild: 23200, + fmeflowBuild: 23200, args: []string{"healthcheck"}, }, { @@ -87,7 +87,7 @@ func TestHealthcheck(t *testing.T) { "extra": "Extra field" }`, wantOutputRegex: "STATUS[\\s]*MESSAGE[\\s]*[\\s]*ok[\\s]*FME Server is healthy", - fmeserverBuild: 23200, + fmeflowBuild: 23200, args: []string{"healthcheck"}, }, { diff --git a/cmd/info.go b/cmd/info.go index 3e778c2..2b7a74d 100644 --- a/cmd/info.go +++ b/cmd/info.go @@ -11,7 +11,7 @@ import ( "github.com/spf13/cobra" ) -type FMEServerInfo struct { +type FMEFlowInfo struct { CurrentTime string `json:"currentTime"` LicenseManagement bool `json:"licenseManagement"` Build string `json:"build"` @@ -32,13 +32,13 @@ func newInfoCmd() *cobra.Command { Long: "Retrieves build, version and time information about FME Server", Example: ` # Output FME Server information in a table - fmeserver info + fmeflow info # Output FME Server information in json - fmeserver info --json + fmeflow info --json # Output just the build string with no column headers - fmeserver info --output=custom-columns="BUILD:.build" --no-headers + fmeflow info --output=custom-columns="BUILD:.build" --no-headers `, Args: NoArgs, RunE: infoRun(&f), @@ -59,7 +59,7 @@ func infoRun(f *infoFlags) func(cmd *cobra.Command, args []string) error { client := &http.Client{} // call the status endpoint to see if it is finished - request, err := buildFmeServerRequest("/fmerest/v3/info", "GET", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/info", "GET", nil) if err != nil { return err } @@ -75,7 +75,7 @@ func infoRun(f *infoFlags) func(cmd *cobra.Command, args []string) error { return err } - var result FMEServerInfo + var result FMEFlowInfo if err := json.Unmarshal(responseData, &result); err != nil { return err } else { diff --git a/cmd/info_test.go b/cmd/info_test.go index 9d5a69f..ab1d96b 100644 --- a/cmd/info_test.go +++ b/cmd/info_test.go @@ -19,7 +19,7 @@ func TestInfo(t *testing.T) { }` // generate random file to back up to - f, err := os.CreateTemp("", "fmeserver-backup") + f, err := os.CreateTemp("", "fmeflow-backup") require.NoError(t, err) defer os.Remove(f.Name()) // clean up diff --git a/cmd/jobs.go b/cmd/jobs.go index b9ff65b..3f99f7c 100644 --- a/cmd/jobs.go +++ b/cmd/jobs.go @@ -71,22 +71,22 @@ func newJobsCmd() *cobra.Command { Example: ` # List all jobs (currently limited to the most recent 1000) - fmeserver jobs --all + fmeflow jobs --all # List all running jobs - fmeserver jobs --running + fmeflow jobs --running # List all jobs from a given repository - fmeserver jobs --repository Samples + fmeflow jobs --repository Samples # List all jobs that ran a given workspace - fmeserver jobs --repository Samples --workspace austinApartments.fmw + fmeflow jobs --repository Samples --workspace austinApartments.fmw # List all jobs in JSON format - fmeserver jobs --json + fmeflow jobs --json # List the workspace, CPU time and peak memory usage for a given repository - fmeserver jobs --repository Samples --output="custom-columns=WORKSPACE:.workspace,CPU Time:.cpuTime,Peak Memory:.peakMemUsage" + fmeflow jobs --repository Samples --output="custom-columns=WORKSPACE:.workspace,CPU Time:.cpuTime,Peak Memory:.peakMemUsage" `, Args: NoArgs, PreRun: func(cmd *cobra.Command, args []string) { @@ -238,7 +238,7 @@ func jobsRun(f *jobsFlags) func(cmd *cobra.Command, args []string) error { func getJobs(endpoint string, allJobs *Jobs, f *jobsFlags) error { client := &http.Client{} - request, err := buildFmeServerRequest(endpoint, "GET", nil) + request, err := buildFmeFlowRequest(endpoint, "GET", nil) if err != nil { return err } diff --git a/cmd/licenseStatus.go b/cmd/licenseStatus.go index c812358..daefa02 100644 --- a/cmd/licenseStatus.go +++ b/cmd/licenseStatus.go @@ -49,7 +49,7 @@ func licenseStatusRun(f *licenseStatusFlags) func(cmd *cobra.Command, args []str client := &http.Client{} // call the status endpoint to see if it is finished - request, err := buildFmeServerRequest("/fmerest/v3/licensing/license/status", "GET", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/licensing/license/status", "GET", nil) if err != nil { return err } diff --git a/cmd/login.go b/cmd/login.go index e80f1b2..776c5ae 100644 --- a/cmd/login.go +++ b/cmd/login.go @@ -50,7 +50,7 @@ type loginFlags struct { expiration int } -var urlErrorMsg = "invalid FME Server URL specified. URL should be of the form https://myfmeserverhostname.com" +var urlErrorMsg = "invalid FME Server URL specified. URL should be of the form https://myfmeflowhostname.com" func newLoginCmd() *cobra.Command { f := loginFlags{} @@ -63,13 +63,13 @@ func newLoginCmd() *cobra.Command { Example: ` # Prompt for user and password for the given FME Server URL - fmeserver login https://my-fmeserver.internal + fmeflow login https://my-fmeflow.internal # Login to an FME Server using a pre-generated token - fmeserver login https://my-fmeserver.internal --token 5937391ad3a87f19ba14dc6082867373087d031b + fmeflow login https://my-fmeflow.internal --token 5937391ad3a87f19ba14dc6082867373087d031b # Login to an FME Server using a passed in user and password file (The password is contained in a file at the path /path/to/password-file) - fmeserver login https://my-fmeserver.internal --user admin --password-file /path/to/password-file`, + fmeflow login https://my-fmeflow.internal --user admin --password-file /path/to/password-file`, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { return nil }, @@ -145,8 +145,8 @@ func loginRun(f *loginFlags) func(cmd *cobra.Command, args []string) error { tokenRequest := TokenRequest{ Restricted: false, - Name: "fmeserver-cli-" + currentTime.Format("20060102150405"), - Description: "Token generated for use with the fmeserver-cli.", + Name: "fmeflow-cli-" + currentTime.Format("20060102150405"), + Description: "Token generated for use with the fmeflow-cli.", ExpirationTimeout: f.expiration, User: f.user, Enabled: true, @@ -193,7 +193,7 @@ func loginRun(f *loginFlags) func(cmd *cobra.Command, args []string) error { viper.Set("url", url) viper.Set("token", f.token) - request, err := buildFmeServerRequest("/fmerest/v3/info", "GET", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/info", "GET", nil) if err != nil { return err } @@ -209,7 +209,7 @@ func loginRun(f *loginFlags) func(cmd *cobra.Command, args []string) error { return err } - var result FMEServerInfo + var result FMEFlowInfo if err := json.Unmarshal(responseData, &result); err != nil { return err } diff --git a/cmd/login_test.go b/cmd/login_test.go index 7bd8fb7..a637cc2 100644 --- a/cmd/login_test.go +++ b/cmd/login_test.go @@ -16,7 +16,7 @@ func TestLogin(t *testing.T) { "lastSaveDate": "2022-11-17T19:30:44Z", "createdDate": "2022-11-17T19:30:44Z", "restricted": false, - "name": "fmeserver-cli-20221117135041", + "name": "fmeflow-cli-20221117135041", "description": "test token from REST API documentation", "type": "USER", "user": "admin", diff --git a/cmd/machinekey.go b/cmd/machinekey.go index bd5e5a2..0f4ad45 100644 --- a/cmd/machinekey.go +++ b/cmd/machinekey.go @@ -30,7 +30,7 @@ func machineKeyRun() func(cmd *cobra.Command, args []string) error { client := &http.Client{} // call the status endpoint to see if it is finished - request, err := buildFmeServerRequest("/fmerest/v3/licensing/machinekey", "GET", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/licensing/machinekey", "GET", nil) if err != nil { return err } diff --git a/cmd/migrationTasks.go b/cmd/migrationTasks.go index 29dd6ce..afe7f20 100644 --- a/cmd/migrationTasks.go +++ b/cmd/migrationTasks.go @@ -61,22 +61,22 @@ func newMigrationTasksCmd() *cobra.Command { Long: "Retrieves the records for migration tasks. Get all migration tasks or for a specific task by passing in the id.", Example: ` # Get all migration tasks - fmeserver migration tasks + fmeflow migration tasks # Get all migration tasks in json - fmeserver migration tasks --json + fmeflow migration tasks --json # Get the migration task for a given id - fmeserver migration tasks --id 1 + fmeflow migration tasks --id 1 # Output the migration log for a given id to the console - fmeserver migration tasks --id 1 --log + fmeflow migration tasks --id 1 --log # Output the migration log for a given id to a local file - fmeserver migration tasks --id 1 --log --file my-backup-log.txt + fmeflow migration tasks --id 1 --log --file my-backup-log.txt # Output just the start and end time of the a given id - fmeserver migration tasks --id 1 --output="custom-columns=Start Time:.startDate,End Time:.finishedDate"`, + fmeflow migration tasks --id 1 --output="custom-columns=Start Time:.startDate,End Time:.finishedDate"`, Args: NoArgs, PreRun: func(cmd *cobra.Command, args []string) { if f.migrationTaskLog { @@ -111,7 +111,7 @@ func migrationTasksRun(f *migrationTasksFlags) func(cmd *cobra.Command, args []s if !f.migrationTaskLog { // output one or more tasks var responseData []byte if f.migrationTaskId == -1 { - request, err := buildFmeServerRequest("/fmerest/v3/migration/tasks", "GET", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/migration/tasks", "GET", nil) if err != nil { return err } @@ -135,7 +135,7 @@ func migrationTasksRun(f *migrationTasksFlags) func(cmd *cobra.Command, args []s } } else { endpoint := "/fmerest/v3/migration/tasks/id/" + strconv.Itoa(f.migrationTaskId) - request, err := buildFmeServerRequest(endpoint, "GET", nil) + request, err := buildFmeFlowRequest(endpoint, "GET", nil) if err != nil { return err } @@ -217,7 +217,7 @@ func migrationTasksRun(f *migrationTasksFlags) func(cmd *cobra.Command, args []s } else if f.migrationTaskId != -1 && f.migrationTaskLog { endpoint := "/fmerest/v3/migration/tasks/id/" + strconv.Itoa(f.migrationTaskId) + "/log" - request, err := buildFmeServerRequest(endpoint, "GET", nil) + request, err := buildFmeFlowRequest(endpoint, "GET", nil) if err != nil { return err } diff --git a/cmd/projects.go b/cmd/projects.go index 327fb0a..eea4b96 100644 --- a/cmd/projects.go +++ b/cmd/projects.go @@ -24,7 +24,7 @@ type ProjectsResource struct { Id int `json:"id"` } -type FMEServerProjects struct { +type FMEFlowProjects struct { Offset int `json:"offset"` Limit int `json:"limit"` TotalCount int `json:"totalCount"` @@ -103,10 +103,10 @@ func newProjectsCmd() *cobra.Command { Long: "Lists projects on the FME Server. Pass in a name to retrieve information on a single project.", Example: ` # List all projects - fmeserver projects + fmeflow projects # List all projects owned by the user admin - fmeserver projects --owner admin`, + fmeflow projects --owner admin`, Args: NoArgs, RunE: projectsRun(&f), } @@ -135,7 +135,7 @@ func projectsRun(f *projectsFlags) func(cmd *cobra.Command, args []string) error } // set up the URL to query - request, err := buildFmeServerRequest(url, "GET", nil) + request, err := buildFmeFlowRequest(url, "GET", nil) if err != nil { return err } @@ -164,7 +164,7 @@ func projectsRun(f *projectsFlags) func(cmd *cobra.Command, args []string) error return err } - var result FMEServerProjects + var result FMEFlowProjects if f.name == "" { // if no name specified, request will return the full struct if err := json.Unmarshal(responseData, &result); err != nil { diff --git a/cmd/projects_download.go b/cmd/projects_download.go index 110b45d..abd83bc 100644 --- a/cmd/projects_download.go +++ b/cmd/projects_download.go @@ -33,10 +33,10 @@ func newProjectDownloadCmd() *cobra.Command { }, Example: ` # download a project named "Test Project" to a local file with default name - fmeserver projects download --name "Test Project" + fmeflow projects download --name "Test Project" # download a project named "Test Project" to a local file named MyProject.fsproject - fmeserver projects download --name "Test Project" -f MyProject.fsproject`, + fmeflow projects download --name "Test Project" -f MyProject.fsproject`, Args: NoArgs, RunE: projectDownloadRun(&f), } @@ -68,7 +68,7 @@ func projectDownloadRun(f *projectsDownloadFlags) func(cmd *cobra.Command, args "excludeSensitiveInfo": {strconv.FormatBool(f.excludeSensitiveInfo)}, } - request, err := buildFmeServerRequest("/fmerest/v3/projects/projects/"+f.name+"/export/download", "POST", strings.NewReader(data.Encode())) + request, err := buildFmeFlowRequest("/fmerest/v3/projects/projects/"+f.name+"/export/download", "POST", strings.NewReader(data.Encode())) if err != nil { return err } diff --git a/cmd/projects_download_test.go b/cmd/projects_download_test.go index 22b48f4..f21704b 100644 --- a/cmd/projects_download_test.go +++ b/cmd/projects_download_test.go @@ -13,7 +13,7 @@ func TestProjectDownload(t *testing.T) { okResponseV3 := `Random file contents` // generate random file to back up to - f, err := os.CreateTemp("", "*fmeserver-project.fsproject") + f, err := os.CreateTemp("", "*fmeflow-project.fsproject") require.NoError(t, err) defer os.Remove(f.Name()) // clean up diff --git a/cmd/projects_upload.go b/cmd/projects_upload.go index 6ebbae8..080dff8 100644 --- a/cmd/projects_upload.go +++ b/cmd/projects_upload.go @@ -45,10 +45,10 @@ func newProjectUploadCmd() *cobra.Command { }, Example: ` # Restore from a backup in a local file - fmeserver projects upload --file ProjectPackage.fsproject + fmeflow projects upload --file ProjectPackage.fsproject # Restore from a backup in a local file using UPDATE mode - fmeserver projects upload --file ProjectPackage.fsproject --import-mode UPDATE`, + fmeflow projects upload --file ProjectPackage.fsproject --import-mode UPDATE`, Args: NoArgs, RunE: projectUploadRun(&f), } @@ -75,7 +75,7 @@ func projectUploadRun(f *projectUploadFlags) func(cmd *cobra.Command, args []str defer file.Close() url = "/fmerest/v3/projects/import/upload" - request, err = buildFmeServerRequest(url, "POST", file) + request, err = buildFmeFlowRequest(url, "POST", file) if err != nil { return err } diff --git a/cmd/projects_upload_test.go b/cmd/projects_upload_test.go index c004dda..2892888 100644 --- a/cmd/projects_upload_test.go +++ b/cmd/projects_upload_test.go @@ -16,7 +16,7 @@ func TestProjectUpload(t *testing.T) { projectContents := "Pretend project file" // generate random file to restore from - f, err := os.CreateTemp("", "fmeserver-project") + f, err := os.CreateTemp("", "fmeflow-project") require.NoError(t, err) defer os.Remove(f.Name()) // clean up err = os.WriteFile(f.Name(), []byte(projectContents), 0644) diff --git a/cmd/refresh.go b/cmd/refresh.go index 36d88bf..378fed7 100644 --- a/cmd/refresh.go +++ b/cmd/refresh.go @@ -29,7 +29,7 @@ func newRefreshCmd() *cobra.Command { Long: "Refreshes the installed license file with a current license from Safe Software.", Example: ` # Refresh the license - fmeserver license refresh`, + fmeflow license refresh`, Args: NoArgs, RunE: refreshRun(&f), } @@ -45,7 +45,7 @@ func refreshRun(f *refreshFlags) func(cmd *cobra.Command, args []string) error { client := &http.Client{} http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true} - request, err := buildFmeServerRequest("/fmerest/v3/licensing/refresh", "POST", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/licensing/refresh", "POST", nil) if err != nil { return err } @@ -68,7 +68,7 @@ func refreshRun(f *refreshFlags) func(cmd *cobra.Command, args []string) error { fmt.Print(".") time.Sleep(1 * time.Second) // call the status endpoint to see if it is finished - request, err := buildFmeServerRequest("/fmerest/v3/licensing/refresh/status", "GET", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/licensing/refresh/status", "GET", nil) if err != nil { return err } diff --git a/cmd/refreshStatus.go b/cmd/refreshStatus.go index 5322922..b488ef4 100644 --- a/cmd/refreshStatus.go +++ b/cmd/refreshStatus.go @@ -24,13 +24,13 @@ func newRefreshStatusCmd() *cobra.Command { Long: "Check the status of a license refresh request.", Example: ` # Output the license refresh status as a table - fmeserver license refresh status + fmeflow license refresh status # Output the license refresh status in json - fmeserver license refresh status --json + fmeflow license refresh status --json # Output just the status message - fmeserver license refresh status --output custom-columns=STATUS:.status --no-headers`, + fmeflow license refresh status --output custom-columns=STATUS:.status --no-headers`, Args: NoArgs, RunE: refreshStatusRun(&f), } @@ -51,7 +51,7 @@ func refreshStatusRun(f *licenseRefreshStatusFlags) func(cmd *cobra.Command, arg client := &http.Client{} // call the status endpoint to see if it is finished - request, err := buildFmeServerRequest("/fmerest/v3/licensing/refresh/status", "GET", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/licensing/refresh/status", "GET", nil) if err != nil { return err } diff --git a/cmd/repositories.go b/cmd/repositories.go index af29bea..92e1788 100644 --- a/cmd/repositories.go +++ b/cmd/repositories.go @@ -13,28 +13,28 @@ import ( "github.com/spf13/viper" ) -type FMEServerRepositoriesV3 struct { - Offset int `json:"offset"` - Limit int `json:"limit"` - TotalCount int `json:"totalCount"` - Items []FMEServerRepositoryV3 `json:"items"` +type FMEFlowRepositoriesV3 struct { + Offset int `json:"offset"` + Limit int `json:"limit"` + TotalCount int `json:"totalCount"` + Items []FMEFlowRepositoryV3 `json:"items"` } -type FMEServerRepositoryV3 struct { +type FMEFlowRepositoryV3 struct { Owner string `json:"owner"` Name string `json:"name"` Description string `json:"description"` Sharable bool `json:"sharable"` } -type FMEServerRepositoriesV4 struct { - Items []FMEServerRepositoryV4 `json:"items"` - Limit int `json:"limit"` - Offset int `json:"offset"` - TotalCount int `json:"totalCount"` +type FMEFlowRepositoriesV4 struct { + Items []FMEFlowRepositoryV4 `json:"items"` + Limit int `json:"limit"` + Offset int `json:"offset"` + TotalCount int `json:"totalCount"` } -type FMEServerRepositoryV4 struct { +type FMEFlowRepositoryV4 struct { CustomFormatCount int `json:"customFormatCount"` CustomTransformerCount int `json:"customTransformerCount"` Description string `json:"description"` @@ -68,26 +68,26 @@ func newRepositoryCmd() *cobra.Command { Example: ` Examples: # List all repositories - fmeserver repositories + fmeflow repositories # List all repositories owned by the admin user - fmeserver repositories --owner admin + fmeflow repositories --owner admin # List a single repository with the name "Samples" - fmeserver repositories --name Samples + fmeflow repositories --name Samples # Output just the name of all the repositories - fmeserver repositories --output=custom-columns=NAME:.name --no-headers + fmeflow repositories --output=custom-columns=NAME:.name --no-headers # Output all repositories in json format - fmeserver repositories --json`, + fmeflow repositories --json`, Args: NoArgs, PreRunE: func(cmd *cobra.Command, args []string) error { // get build to decide if we should use v3 or v4 // FME Server 2023.0 and later can use v4. Otherwise fall back to v3 if f.apiVersion == "" { - fmeserverBuild := viper.GetInt("build") - if fmeserverBuild < repositoriesV4BuildThreshold { + fmeflowBuild := viper.GetInt("build") + if fmeflowBuild < repositoriesV4BuildThreshold { f.apiVersion = apiVersionFlagV3 } else { f.apiVersion = apiVersionFlagV4 @@ -135,7 +135,7 @@ func repositoriesRun(f *repositoryFlags) func(cmd *cobra.Command, args []string) // add the repository name to the request if specified url = url + "/" + f.name } - request, err := buildFmeServerRequest(url, "GET", nil) + request, err := buildFmeFlowRequest(url, "GET", nil) if err != nil { return err } @@ -183,7 +183,7 @@ func repositoriesRun(f *repositoryFlags) func(cmd *cobra.Command, args []string) return err } - var result FMEServerRepositoriesV4 + var result FMEFlowRepositoriesV4 if f.name == "" { // if no name specified, request will return the full struct @@ -193,7 +193,7 @@ func repositoriesRun(f *repositoryFlags) func(cmd *cobra.Command, args []string) } else { // else, we are getting a single repository. We will just append this // to the Item list in the full struct for easier parsing - var singleResult FMEServerRepositoryV4 + var singleResult FMEFlowRepositoryV4 if err := json.Unmarshal(responseData, &singleResult); err != nil { return err } @@ -263,7 +263,7 @@ func repositoriesRun(f *repositoryFlags) func(cmd *cobra.Command, args []string) // add the repository name to the request if specified url = url + "/" + f.name } - request, err := buildFmeServerRequest(url, "GET", nil) + request, err := buildFmeFlowRequest(url, "GET", nil) if err != nil { return err } @@ -291,7 +291,7 @@ func repositoriesRun(f *repositoryFlags) func(cmd *cobra.Command, args []string) return err } - var result FMEServerRepositoriesV3 + var result FMEFlowRepositoriesV3 if f.name == "" { // if no name specified, request will return the full struct @@ -301,7 +301,7 @@ func repositoriesRun(f *repositoryFlags) func(cmd *cobra.Command, args []string) } else { // else, we are getting a single repository. We will just append this // to the Item list in the full struct for easier parsing - var singleResult FMEServerRepositoryV3 + var singleResult FMEFlowRepositoryV3 if err := json.Unmarshal(responseData, &singleResult); err != nil { return err } diff --git a/cmd/repositories_create.go b/cmd/repositories_create.go index 48610bb..23b3be4 100644 --- a/cmd/repositories_create.go +++ b/cmd/repositories_create.go @@ -34,17 +34,17 @@ func newRepositoryCreateCmd() *cobra.Command { Example: ` Examples: # Create a repository with the name "myRepository" and no description - fmeserver repositories create --name myRepository + fmeflow repositories create --name myRepository # Output just the name of all the repositories - fmeserver repositories create --name myRepository --description "This is my new repository" + fmeflow repositories create --name myRepository --description "This is my new repository" `, PreRunE: func(cmd *cobra.Command, args []string) error { // get build to decide if we should use v3 or v4 // FME Server 2023.0 and later can use v4. Otherwise fall back to v3 if f.apiVersion == "" { - fmeserverBuild := viper.GetInt("build") - if fmeserverBuild < repositoriesV4BuildThreshold { + fmeflowBuild := viper.GetInt("build") + if fmeflowBuild < repositoriesV4BuildThreshold { f.apiVersion = apiVersionFlagV3 } else { f.apiVersion = apiVersionFlagV4 @@ -82,7 +82,7 @@ func repositoriesCreateRun(f *repositoryCreateFlags) func(cmd *cobra.Command, ar return err } - request, err := buildFmeServerRequest("/fmeapiv4/repositories", "POST", bytes.NewBuffer(jsonData)) + request, err := buildFmeFlowRequest("/fmeapiv4/repositories", "POST", bytes.NewBuffer(jsonData)) if err != nil { return err } @@ -138,7 +138,7 @@ func repositoriesCreateRun(f *repositoryCreateFlags) func(cmd *cobra.Command, ar data.Add("description", f.description) } - request, err := buildFmeServerRequest("/fmerest/v3/repositories", "POST", strings.NewReader(data.Encode())) + request, err := buildFmeFlowRequest("/fmerest/v3/repositories", "POST", strings.NewReader(data.Encode())) if err != nil { return err } diff --git a/cmd/repositories_delete.go b/cmd/repositories_delete.go index 2c1c8af..8098cfc 100644 --- a/cmd/repositories_delete.go +++ b/cmd/repositories_delete.go @@ -27,17 +27,17 @@ func newRepositoryDeleteCmd() *cobra.Command { Example: ` Examples: # Delete a repository with the name "myRepository" - fmeserver repositories delete --name myRepository + fmeflow repositories delete --name myRepository # Delete a repository with the name "myRepository" and no confirmation - fmeserver repositories delete --name myRepository --no-prompt + fmeflow repositories delete --name myRepository --no-prompt `, PreRunE: func(cmd *cobra.Command, args []string) error { // get build to decide if we should use v3 or v4 // FME Server 2023.0 and later can use v4. Otherwise fall back to v3 if f.apiVersion == "" { - fmeserverBuild := viper.GetInt("build") - if fmeserverBuild < repositoriesV4BuildThreshold { + fmeflowBuild := viper.GetInt("build") + if fmeflowBuild < repositoriesV4BuildThreshold { f.apiVersion = apiVersionFlagV3 } else { f.apiVersion = apiVersionFlagV4 @@ -84,7 +84,7 @@ func repositoriesDeleteRun(f *repositoryDeleteFlags) func(cmd *cobra.Command, ar url = "/fmerest/v3/repositories/" + f.name } - request, err := buildFmeServerRequest(url, "DELETE", nil) + request, err := buildFmeFlowRequest(url, "DELETE", nil) if err != nil { return err } diff --git a/cmd/request.go b/cmd/request.go index 3ca7c7a..88d1307 100644 --- a/cmd/request.go +++ b/cmd/request.go @@ -40,10 +40,10 @@ func newLicenseRequestCmd() *cobra.Command { If no serial number is passed in, a trial license will be requested.`, Example: ` # Request a trial license and wait for it to be downloaded and installed - fmeserver license request --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." --wait + fmeflow license request --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." --wait # Request a license with a serial number - fmeserver license request --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." --serial-number "AAAA-BBBB-CCCC" + fmeflow license request --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." --serial-number "AAAA-BBBB-CCCC" `, Args: NoArgs, RunE: licenseRequestRun(&f), @@ -98,7 +98,7 @@ func licenseRequestRun(f *licenseRequestFlags) func(cmd *cobra.Command, args []s data.Add("subscribeToUpdates", "true") } - request, err := buildFmeServerRequest("/fmerest/v3/licensing/request", "POST", strings.NewReader(data.Encode())) + request, err := buildFmeFlowRequest("/fmerest/v3/licensing/request", "POST", strings.NewReader(data.Encode())) if err != nil { return err } @@ -130,7 +130,7 @@ func licenseRequestRun(f *licenseRequestFlags) func(cmd *cobra.Command, args []s time.Sleep(1 * time.Second) // call the status endpoint to see if it is finished - request, err := buildFmeServerRequest("/fmerest/v3/licensing/request/status", "GET", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/licensing/request/status", "GET", nil) if err != nil { return err } diff --git a/cmd/requestStatus.go b/cmd/requestStatus.go index bfece6d..73efde5 100644 --- a/cmd/requestStatus.go +++ b/cmd/requestStatus.go @@ -24,13 +24,13 @@ func newLicenseRequestStatusCmd() *cobra.Command { Long: "Check the status of a license request.", Example: ` # Output the license request status as a table - fmeserver license request status + fmeflow license request status # Output the license Request status in json - fmeserver license request status --json + fmeflow license request status --json # Output just the status message - fmeserver license request status --output custom-columns=STATUS:.status --no-headers`, + fmeflow license request status --output custom-columns=STATUS:.status --no-headers`, Args: NoArgs, RunE: licenseRequestStatusRun(&f), } @@ -50,7 +50,7 @@ func licenseRequestStatusRun(f *licenseRequestStatusFlags) func(cmd *cobra.Comma client := &http.Client{} // call the status endpoint to see if it is finished - request, err := buildFmeServerRequest("/fmerest/v3/licensing/request/status", "GET", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/licensing/request/status", "GET", nil) if err != nil { return err } diff --git a/cmd/requestfile.go b/cmd/requestfile.go index e5c71b5..13de9a1 100644 --- a/cmd/requestfile.go +++ b/cmd/requestfile.go @@ -35,10 +35,10 @@ func newLicenseRequestFileCmd() *cobra.Command { Example: # Generate a license request file and output to the console - fmeserver license requestfile --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." + fmeflow license requestfile --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." # Generate a license request file and output to a local file - fmeserver license requestfile --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." --file my-request-file.json`, + fmeflow license requestfile --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." --file my-request-file.json`, Args: NoArgs, RunE: licenseRequestFileRun(&f), } @@ -92,7 +92,7 @@ func licenseRequestFileRun(f *licenseRequestFileFlags) func(cmd *cobra.Command, data.Add("subscribeToUpdates", "true") } - request, err := buildFmeServerRequest("/fmerest/v3/licensing/requestfile", "POST", strings.NewReader(data.Encode())) + request, err := buildFmeFlowRequest("/fmerest/v3/licensing/requestfile", "POST", strings.NewReader(data.Encode())) if err != nil { return err } diff --git a/cmd/restore.go b/cmd/restore.go index b83e3f1..167dad2 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -62,16 +62,16 @@ func newRestoreCmd() *cobra.Command { }, Example: ` # Restore from a backup in a local file - fmeserver restore --file ServerConfigPackage.fsconfig + fmeflow restore --file ServerConfigPackage.fsconfig # Restore from a backup in a local file using UPDATE mode - fmeserver restore --file ServerConfigPackage.fsconfig --import-mode UPDATE + fmeflow restore --file ServerConfigPackage.fsconfig --import-mode UPDATE # Restore from a backup file stored in the Backup resource folder (FME_SHAREDRESOURCE_BACKUP) named ServerConfigPackage.fsconfig - fmeserver restore --resource --file ServerConfigPackage.fsconfig + fmeflow restore --resource --file ServerConfigPackage.fsconfig # Restore from a backup file stored in the Data resource folder (FME_SHAREDRESOURCE_DATA) named ServerConfigPackage.fsconfig and set a failure and success topic to notify - fmeserver restore --resource --resource-name FME_SHAREDRESOURCE_DATA --file ServerConfigPackage.fsconfig --failure-topic MY_FAILURE_TOPIC --success-topic MY_SUCCESS_TOPIC + fmeflow restore --resource --resource-name FME_SHAREDRESOURCE_DATA --file ServerConfigPackage.fsconfig --failure-topic MY_FAILURE_TOPIC --success-topic MY_SUCCESS_TOPIC `, Args: NoArgs, RunE: restoreRun(&f), @@ -103,7 +103,7 @@ func restoreRun(f *restoreFlags) func(cmd *cobra.Command, args []string) error { defer file.Close() url = "/fmerest/v3/migration/restore/upload" - request, err = buildFmeServerRequest(url, "POST", file) + request, err = buildFmeFlowRequest(url, "POST", file) if err != nil { return err } @@ -111,7 +111,7 @@ func restoreRun(f *restoreFlags) func(cmd *cobra.Command, args []string) error { } else { url = "/fmerest/v3/migration/restore/resource" var err error - request, err = buildFmeServerRequest(url, "POST", nil) + request, err = buildFmeFlowRequest(url, "POST", nil) if err != nil { return err } diff --git a/cmd/restore_test.go b/cmd/restore_test.go index c88fda7..ac25523 100644 --- a/cmd/restore_test.go +++ b/cmd/restore_test.go @@ -16,7 +16,7 @@ func TestRestore(t *testing.T) { backupContents := "Pretend backup file" // generate random file to restore from - f, err := os.CreateTemp("", "fmeserver-backup") + f, err := os.CreateTemp("", "fmeflow-backup") require.NoError(t, err) defer os.Remove(f.Name()) // clean up err = os.WriteFile(f.Name(), []byte(backupContents), 0644) diff --git a/cmd/root.go b/cmd/root.go index b2ceb01..78209c6 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -17,7 +17,7 @@ var jsonOutput bool const notSet string = "not set" -// this information will be collected at build time, by `-ldflags "-X github.com/safesoftware/fmeserver-cli/cmd.appVersion=0.1"` +// this information will be collected at build time, by `-ldflags "-X github.com/safesoftware/fmeflow-cli/cmd.appVersion=0.1"` var appVersion = notSet var ErrSilent = errors.New("ErrSilent") @@ -27,7 +27,7 @@ var rootCmd = NewRootCommand() func NewRootCommand() *cobra.Command { cmds := &cobra.Command{ - Use: "fmeserver", + Use: "fmeflow", Short: "A command line interface for interacting with FME Server.", Long: `A command line interface for interacting with FME Server. See available commands below. Get started with the login command.`, Version: appVersion, @@ -62,7 +62,7 @@ func NewRootCommand() *cobra.Command { cobra.OnInitialize(initConfig) http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true} - cmds.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.config/.fmeserver-cli.yaml)") + cmds.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.config/.fmeflow-cli.yaml)") cmds.PersistentFlags().BoolVar(&jsonOutput, "json", false, "Output JSON") return cmds @@ -92,7 +92,7 @@ func initConfig() { defaultConfigDirectory = filepath.Join(home, ".config") } - viper.SetConfigFile(filepath.Join(defaultConfigDirectory, ".fmeserver-cli.yaml")) + viper.SetConfigFile(filepath.Join(defaultConfigDirectory, ".fmeflow-cli.yaml")) } //fmt.Println(viper.ConfigFileUsed()) diff --git a/cmd/run.go b/cmd/run.go index 309db9b..ec57fa3 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -99,22 +99,22 @@ func newRunCmd() *cobra.Command { Examples: # Submit a job asynchronously - fmeserver run --repository Samples --workspace austinApartments.fmw + fmeflow run --repository Samples --workspace austinApartments.fmw # Submit a job and wait for it to complete - fmeserver run --repository Samples --workspace austinApartments.fmw --wait + fmeflow run --repository Samples --workspace austinApartments.fmw --wait # Submit a job to a specific queue and set a time to live in the queue - fmeserver run --repository Samples --workspace austinApartments.fmw --tag Queue1 --time-to-live 120 + fmeflow run --repository Samples --workspace austinApartments.fmw --tag Queue1 --time-to-live 120 # Submit a job and pass in a few published parameters - fmeserver run --repository Samples --workspace austinDownload.fmw --published-parameter-list THEMES=railroad,airports --published-parameter COORDSYS=TX83-CF + fmeflow run --repository Samples --workspace austinDownload.fmw --published-parameter-list THEMES=railroad,airports --published-parameter COORDSYS=TX83-CF # Submit a job, wait for it to complete, and customize the output - fmeserver run --repository Samples --workspace austinApartments.fmw --wait --output="custom-columns=Time Requested:.timeRequested,Time Started:.timeStarted,Time Finished:.timeFinished" + fmeflow run --repository Samples --workspace austinApartments.fmw --wait --output="custom-columns=Time Requested:.timeRequested,Time Started:.timeStarted,Time Finished:.timeFinished" # Upload a local file to use as the source data for the translation - fmeserver run --repository Samples --workspace austinApartments.fmw --file Landmarks-edited.sqlite --wait`, + fmeflow run --repository Samples --workspace austinApartments.fmw --file Landmarks-edited.sqlite --wait`, Args: NoArgs, RunE: runRun(&f), } @@ -230,7 +230,7 @@ func runRun(f *runFlags) func(cmd *cobra.Command, args []string) error { endpoint := "/fmerest/v3/transformations/" + submitEndpoint + "/" + f.repository + "/" + f.workspace - request, err := buildFmeServerRequest(endpoint, "POST", strings.NewReader(string(jobJson))) + request, err := buildFmeFlowRequest(endpoint, "POST", strings.NewReader(string(jobJson))) if err != nil { return err } @@ -285,7 +285,7 @@ func runRun(f *runFlags) func(cmd *cobra.Command, args []string) error { defer file.Close() endpoint := "/fmerest/v3/transformations/transactdata/" + f.repository + "/" + f.workspace - request, err := buildFmeServerRequest(endpoint, "POST", file) + request, err := buildFmeFlowRequest(endpoint, "POST", file) if err != nil { return err } diff --git a/cmd/systemcode.go b/cmd/systemcode.go index cf2b90a..8e95f45 100644 --- a/cmd/systemcode.go +++ b/cmd/systemcode.go @@ -31,7 +31,7 @@ func systemCodeRun() func(cmd *cobra.Command, args []string) error { client := &http.Client{} // call the status endpoint to see if it is finished - request, err := buildFmeServerRequest("/fmerest/v3/licensing/systemcode", "GET", nil) + request, err := buildFmeFlowRequest("/fmerest/v3/licensing/systemcode", "GET", nil) if err != nil { return err } diff --git a/cmd/testFunctions.go b/cmd/testFunctions.go index ca757ae..9f3467d 100644 --- a/cmd/testFunctions.go +++ b/cmd/testFunctions.go @@ -31,7 +31,7 @@ type testCase struct { wantFormParamsList map[string][]string // for URL forms with multiple values wantFileContents fileContents // check file contents wantBodyRegEx string // check the contents of the body sent - fmeserverBuild int // build to pretend we are contacting + fmeflowBuild int // build to pretend we are contacting args []string // flags to pass into the command httpServer *httptest.Server // custom http test server if needed omitConfig bool // set this to true if testing a command with no config file set up @@ -79,8 +79,8 @@ func runTests(tcs []testCase, t *testing.T) { if !tc.omitConfigToken { viper.Set("token", testToken) } - if tc.fmeserverBuild != 0 { - viper.Set("build", tc.fmeserverBuild) + if tc.fmeflowBuild != 0 { + viper.Set("build", tc.fmeflowBuild) } else { viper.Set("build", 23159) } diff --git a/cmd/workspaces.go b/cmd/workspaces.go index 20f6493..8c424d5 100644 --- a/cmd/workspaces.go +++ b/cmd/workspaces.go @@ -14,7 +14,7 @@ import ( "github.com/spf13/viper" ) -type FMEServerWorkspacesV4 struct { +type FMEFlowWorkspacesV4 struct { Items []struct { AverageCPUPercent float64 `json:"averageCpuPercent"` AverageCPUTime float64 `json:"averageCpuTime"` @@ -39,7 +39,7 @@ type FMEServerWorkspacesV4 struct { TotalCount int `json:"totalCount"` } -type FMEServerWorkspaceDetailedV4 struct { +type FMEFlowWorkspaceDetailedV4 struct { AverageCPUPercent float64 `json:"averageCpuPercent"` AverageCPUTime float64 `json:"averageCpuTime"` AverageElapsedTime float64 `json:"averageElapsedTime"` @@ -205,14 +205,14 @@ type FMEServerWorkspaceDetailedV4 struct { UserName string `json:"userName"` } -type FMEServerWorkspacesV3 struct { - Offset int `json:"offset"` - Limit int `json:"limit"` - TotalCount int `json:"totalCount"` - Items []FMEServerWorkspaceV3 `json:"items"` +type FMEFlowWorkspacesV3 struct { + Offset int `json:"offset"` + Limit int `json:"limit"` + TotalCount int `json:"totalCount"` + Items []FMEFlowWorkspaceV3 `json:"items"` } -type FMEServerWorkspaceV3 struct { +type FMEFlowWorkspaceV3 struct { LastSaveDate time.Time `json:"lastSaveDate"` AvgCPUPct float64 `json:"avgCpuPct"` AvgPeakMemUsage int `json:"avgPeakMemUsage"` @@ -230,7 +230,7 @@ type FMEServerWorkspaceV3 struct { AvgElapsedTime int `json:"avgElapsedTime"` } -type FMEServerWorkspaceDetailedV3 struct { +type FMEFlowWorkspaceDetailedV3 struct { LegalTermsConditions string `json:"legalTermsConditions"` AvgCPUPct float64 `json:"avgCpuPct"` Usage string `json:"usage"` @@ -340,29 +340,29 @@ func newWorkspaceCmd() *cobra.Command { Example: ` Examples: # List all workspaces on the FME Server - fmeserver workspaces + fmeflow workspaces # List all workspaces in Samples repository - fmeserver workspaces --repository Samples + fmeflow workspaces --repository Samples # List all workspaces in the Samples repository and output it in json - fmeserver workspaces --repository Samples --json + fmeflow workspaces --repository Samples --json # List all workspaces in the Samples repository with custom columns showing the last publish date and number of times run - fmeserver workspaces --repository Samples --output="custom-columns=NAME:.name,PUBLISH DATE:.lastPublishDate,TOTAL RUNS:.totalRuns" + fmeflow workspaces --repository Samples --output="custom-columns=NAME:.name,PUBLISH DATE:.lastPublishDate,TOTAL RUNS:.totalRuns" # Get information on a single workspace - fmeserver workspaces --repository Samples --name austinApartments.fmw + fmeflow workspaces --repository Samples --name austinApartments.fmw # Get the name, source format, and destination format for this workspace - fmeserver workspaces --repository Samples --name austinApartments.fmw --output=custom-columns=NAME:.name,SOURCE:.datasets.source[*].format,DEST:.datasets.destination[*].format`, + fmeflow workspaces --repository Samples --name austinApartments.fmw --output=custom-columns=NAME:.name,SOURCE:.datasets.source[*].format,DEST:.datasets.destination[*].format`, Args: NoArgs, PreRunE: func(cmd *cobra.Command, args []string) error { // get build to decide if we should use v3 or v4 // FME Server 2023.0 and later can use v4. Otherwise fall back to v3 if f.apiVersion == "" { - fmeserverBuild := viper.GetInt("build") - if fmeserverBuild < repositoriesV4BuildThreshold { + fmeflowBuild := viper.GetInt("build") + if fmeflowBuild < repositoriesV4BuildThreshold { f.apiVersion = apiVersionFlagV3 } else { f.apiVersion = apiVersionFlagV4 @@ -412,7 +412,7 @@ func workspacesRun(f *workspaceFlags) func(cmd *cobra.Command, args []string) er // add the repository name to the request if specified url = url + "/" + f.repository + "/" + f.name } - request, err := buildFmeServerRequest(url, "GET", nil) + request, err := buildFmeFlowRequest(url, "GET", nil) if err != nil { return err } @@ -466,8 +466,8 @@ func workspacesRun(f *workspaceFlags) func(cmd *cobra.Command, args []string) er return err } - var result FMEServerWorkspacesV4 - var resultDetailed FMEServerWorkspaceDetailedV4 + var result FMEFlowWorkspacesV4 + var resultDetailed FMEFlowWorkspaceDetailedV4 if f.name == "" { // if no name specified, request will return the full struct @@ -555,7 +555,7 @@ func workspacesRun(f *workspaceFlags) func(cmd *cobra.Command, args []string) er url += "/" + f.name } - request, err := buildFmeServerRequest(url, "GET", nil) + request, err := buildFmeFlowRequest(url, "GET", nil) if err != nil { return err } @@ -581,8 +581,8 @@ func workspacesRun(f *workspaceFlags) func(cmd *cobra.Command, args []string) er if err != nil { return err } - var result FMEServerWorkspacesV3 - var resultDetailed FMEServerWorkspaceDetailedV3 + var result FMEFlowWorkspacesV3 + var resultDetailed FMEFlowWorkspaceDetailedV3 if f.name == "" { // if no name specified, request will return the full struct if err := json.Unmarshal(responseData, &result); err != nil { diff --git a/cmd/workspaces_test.go b/cmd/workspaces_test.go index e3d5aab..e8bf672 100644 --- a/cmd/workspaces_test.go +++ b/cmd/workspaces_test.go @@ -665,7 +665,7 @@ func TestWorkspaces(t *testing.T) { } ], "format": "OGCKML", - "location": "/data/fmeserverdata/resources/system/temp/engineresults\\austinApartments.kml", + "location": "/data/fmeflowdata/resources/system/temp/engineresults\\austinApartments.kml", "name": "OGCKML_1", "properties": [ { @@ -895,7 +895,7 @@ func TestWorkspaces(t *testing.T) { { "format": "OGCKML", "name": "OGCKML_1", - "location": "/data/fmeserverdata/resources/system/temp/engineresults\\austinApartments.kml", + "location": "/data/fmeflowdata/resources/system/temp/engineresults\\austinApartments.kml", "source": false, "featuretypes": [ { diff --git a/docgen/docgen.go b/docgen/docgen.go index e4b7ba3..70ac945 100644 --- a/docgen/docgen.go +++ b/docgen/docgen.go @@ -3,7 +3,7 @@ package main import ( "log" - "github.com/safesoftware/fmeserver-cli/cmd" + "github.com/safesoftware/fmeflow-cli/cmd" "github.com/spf13/cobra/doc" ) diff --git a/docs/custom-columns.md b/docs/custom-columns.md index 9defb29..84fe153 100644 --- a/docs/custom-columns.md +++ b/docs/custom-columns.md @@ -21,7 +21,7 @@ When crafting a `custom-column` output for a given command that supports it in t For example, let's output all the workspaces in the `Samples` repository. ``` -> fmeserver workspaces --repository Samples +> fmeflow workspaces --repository Samples NAME TITLE LAST SAVE DATE austinApartments.fmw City of Austin: Apartments and other (SPATIALITE 2 KML) 2022-06-15 10:59:24 +0000 UTC austinDownload.fmw City of Austin: Data Download 2022-06-15 13:40:29 +0000 UTC @@ -30,7 +30,7 @@ For example, let's output all the workspaces in the `Samples` repository. ``` In order to see what data we can output in our `custom-columns` output, we should take a look at the raw JSON: ``` -> fmeserver workspaces --repository Samples --json +> fmeflow workspaces --repository Samples --json { "items": [ { @@ -63,7 +63,7 @@ The output has been truncated here to organize it better, but we can now see wha This means to output the workspace name along with the average CPU percent and average elapsed time, our CLI command looks like this: ``` -> fmeserver workspaces --repository Samples --output custom-columns="NAME:.name,CPU PERCENT:.averageCpuPercent,ELAPSED TIME:.averageElapsedTime" +> fmeflow workspaces --repository Samples --output custom-columns="NAME:.name,CPU PERCENT:.averageCpuPercent,ELAPSED TIME:.averageElapsedTime" NAME CPU PERCENT ELAPSED TIME austinApartments.fmw 13.242375601926163 1246 austinDownload.fmw 63.6535552193646 2644 @@ -73,7 +73,7 @@ This means to output the workspace name along with the average CPU percent and a For a slightly more complicated example, specifying a specific workspace gives more data: ``` -> fmeserver workspaces --repository Samples --name "austinApartments.fmw" --json +> fmeflow workspaces --repository Samples --name "austinApartments.fmw" --json { "name": "austinApartments.fmw", "title": "City of Austin: Apartments and other (SPATIALITE 2 KML)", @@ -165,7 +165,7 @@ For a slightly more complicated example, specifying a specific workspace gives m } ], "format": "OGCKML", - "location": "/data/fmeserverdata/resources/system/temp/engineresults\\austinApartments.kml", + "location": "/data/fmeflowdata/resources/system/temp/engineresults\\austinApartments.kml", "name": "OGCKML_1", "properties": [ { @@ -191,12 +191,12 @@ For a slightly more complicated example, specifying a specific workspace gives m The JSON about a single workspace includes information on source and destination datasets, that are stored in a JSON list. In JSONPath, lists are accessed using `[]`, with a specific index being specified as a number such as `[0]`, or all results from that list being denoted as `[*]`. For examples, if we want to get all the source formats for this workspace, we would use the JSonPath query `.datasets.source[*].format`. A full example: ``` -> fmeserver workspaces --repository Samples --name "austinApartments.fmw" --output custom-columns="NAME:.name,SOURCE:.datasets.source[*].format,DEST:datasets.destination[*].format" +> fmeflow workspaces --repository Samples --name "austinApartments.fmw" --output custom-columns="NAME:.name,SOURCE:.datasets.source[*].format,DEST:datasets.destination[*].format" NAME SOURCE DEST austinApartments.fmw SPATIALITE_NATIVE OGCKML ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. diff --git a/docs/fmeserver.md b/docs/fmeserver.md index bb1c298..d101f99 100644 --- a/docs/fmeserver.md +++ b/docs/fmeserver.md @@ -1,4 +1,4 @@ -## fmeserver +## fmeflow A command line interface for interacting with FME Server. @@ -9,28 +9,28 @@ A command line interface for interacting with FME Server. See available commands ### Options ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) - -h, --help help for fmeserver + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) + -h, --help help for fmeflow --json Output JSON ``` ### SEE ALSO -* [fmeserver backup](fmeserver_backup.md) - Backs up the FME Server configuration -* [fmeserver cancel](fmeserver_cancel.md) - Cancel a running job on FME Server -* [fmeserver completion](fmeserver_completion.md) - Generate the autocompletion script for the specified shell -* [fmeserver deploymentparameters](fmeserver_deploymentparameters.md) - List Deployment Parameters -* [fmeserver engines](fmeserver_engines.md) - Get information about the FME Engines -* [fmeserver healthcheck](fmeserver_healthcheck.md) - Retrieves the health status of FME Server -* [fmeserver info](fmeserver_info.md) - Retrieves build, version and time information about FME Server -* [fmeserver jobs](fmeserver_jobs.md) - Lists jobs on FME Server -* [fmeserver license](fmeserver_license.md) - Interact with licensing an FME Server -* [fmeserver login](fmeserver_login.md) - Save credentials for an FME Server -* [fmeserver migration](fmeserver_migration.md) - Returns information on migration tasks using the tasks subcommand. -* [fmeserver projects](fmeserver_projects.md) - Lists projects on the FME Server -* [fmeserver repositories](fmeserver_repositories.md) - List repositories -* [fmeserver restore](fmeserver_restore.md) - Restores the FME Server configuration from an import package -* [fmeserver run](fmeserver_run.md) - Run a workspace on FME Server. -* [fmeserver workspaces](fmeserver_workspaces.md) - List workspaces. +* [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 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 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. * [Custom Columns output](custom-columns.md) - In depth documentation on using the `custom-columns` output type diff --git a/docs/fmeserver_backup.md b/docs/fmeserver_backup.md index 42cdb6c..962968b 100644 --- a/docs/fmeserver_backup.md +++ b/docs/fmeserver_backup.md @@ -1,4 +1,4 @@ -## fmeserver backup +## fmeflow backup Backs up the FME Server configuration @@ -7,7 +7,7 @@ Backs up the FME Server configuration Backs up the FME Server configuration to a local file or to a shared resource location on the FME Server. ``` -fmeserver backup [flags] +fmeflow backup [flags] ``` ### Examples @@ -15,10 +15,10 @@ fmeserver backup [flags] ``` # back up to a local file - fmeserver backup -f my_local_backup.fsconfig + fmeflow backup -f my_local_backup.fsconfig # back up to the "Backup" folder in the FME Server Shared Resources with the file name my_fme_backup.fsconfig - fmeserver backup --resource --export-package my_fme_backup.fsconfig + fmeflow backup --resource --export-package my_fme_backup.fsconfig ``` ### Options @@ -36,11 +36,11 @@ fmeserver backup [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. diff --git a/docs/fmeserver_cancel.md b/docs/fmeserver_cancel.md index 3787267..3cb9c74 100644 --- a/docs/fmeserver_cancel.md +++ b/docs/fmeserver_cancel.md @@ -1,4 +1,4 @@ -## fmeserver cancel +## fmeflow cancel Cancel a running job on FME Server @@ -7,7 +7,7 @@ Cancel a running job on FME Server Cancels the job and marks it as aborted in the completed jobs section, but does not remove it from the database. ``` -fmeserver cancel [flags] +fmeflow cancel [flags] ``` ### Examples @@ -15,7 +15,7 @@ fmeserver cancel [flags] ``` # Cancel a job with id 42 - fmeserver cancel --id 42 + fmeflow cancel --id 42 ``` @@ -29,11 +29,11 @@ fmeserver cancel [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. diff --git a/docs/fmeserver_completion.md b/docs/fmeserver_completion.md index 54613d0..d0f938a 100644 --- a/docs/fmeserver_completion.md +++ b/docs/fmeserver_completion.md @@ -1,10 +1,10 @@ -## fmeserver completion +## fmeflow completion Generate the autocompletion script for the specified shell ### Synopsis -Generate the autocompletion script for fmeserver for the specified shell. +Generate the autocompletion script for fmeflow for the specified shell. See each sub-command's help for details on how to use the generated script. @@ -17,15 +17,15 @@ See each sub-command's help for details on how to use the generated script. ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. -* [fmeserver completion bash](fmeserver_completion_bash.md) - Generate the autocompletion script for bash -* [fmeserver completion fish](fmeserver_completion_fish.md) - Generate the autocompletion script for fish -* [fmeserver completion powershell](fmeserver_completion_powershell.md) - Generate the autocompletion script for powershell -* [fmeserver completion zsh](fmeserver_completion_zsh.md) - Generate the autocompletion script for zsh +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. +* [fmeflow completion bash](fmeflow_completion_bash.md) - Generate the autocompletion script for bash +* [fmeflow completion fish](fmeflow_completion_fish.md) - Generate the autocompletion script for fish +* [fmeflow completion powershell](fmeflow_completion_powershell.md) - Generate the autocompletion script for powershell +* [fmeflow completion zsh](fmeflow_completion_zsh.md) - Generate the autocompletion script for zsh diff --git a/docs/fmeserver_completion_bash.md b/docs/fmeserver_completion_bash.md index bf166b5..4ba809a 100644 --- a/docs/fmeserver_completion_bash.md +++ b/docs/fmeserver_completion_bash.md @@ -1,4 +1,4 @@ -## fmeserver completion bash +## fmeflow completion bash Generate the autocompletion script for bash @@ -11,23 +11,23 @@ If it is not installed already, you can install it via your OS's package manager To load completions in your current shell session: - source <(fmeserver completion bash) + source <(fmeflow completion bash) To load completions for every new session, execute once: #### Linux: - fmeserver completion bash > /etc/bash_completion.d/fmeserver + fmeflow completion bash > /etc/bash_completion.d/fmeflow #### macOS: - fmeserver completion bash > $(brew --prefix)/etc/bash_completion.d/fmeserver + fmeflow completion bash > $(brew --prefix)/etc/bash_completion.d/fmeflow You will need to start a new shell for this setup to take effect. ``` -fmeserver completion bash +fmeflow completion bash ``` ### Options @@ -40,11 +40,11 @@ fmeserver completion bash ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver completion](fmeserver_completion.md) - Generate the autocompletion script for the specified shell +* [fmeflow completion](fmeflow_completion.md) - Generate the autocompletion script for the specified shell diff --git a/docs/fmeserver_completion_fish.md b/docs/fmeserver_completion_fish.md index 9d7da63..b298b1c 100644 --- a/docs/fmeserver_completion_fish.md +++ b/docs/fmeserver_completion_fish.md @@ -1,4 +1,4 @@ -## fmeserver completion fish +## fmeflow completion fish Generate the autocompletion script for fish @@ -8,17 +8,17 @@ Generate the autocompletion script for the fish shell. To load completions in your current shell session: - fmeserver completion fish | source + fmeflow completion fish | source To load completions for every new session, execute once: - fmeserver completion fish > ~/.config/fish/completions/fmeserver.fish + fmeflow completion fish > ~/.config/fish/completions/fmeflow.fish You will need to start a new shell for this setup to take effect. ``` -fmeserver completion fish [flags] +fmeflow completion fish [flags] ``` ### Options @@ -31,11 +31,11 @@ fmeserver completion fish [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver completion](fmeserver_completion.md) - Generate the autocompletion script for the specified shell +* [fmeflow completion](fmeflow_completion.md) - Generate the autocompletion script for the specified shell diff --git a/docs/fmeserver_completion_powershell.md b/docs/fmeserver_completion_powershell.md index 60be971..72fe413 100644 --- a/docs/fmeserver_completion_powershell.md +++ b/docs/fmeserver_completion_powershell.md @@ -1,4 +1,4 @@ -## fmeserver completion powershell +## fmeflow completion powershell Generate the autocompletion script for powershell @@ -8,14 +8,14 @@ Generate the autocompletion script for powershell. To load completions in your current shell session: - fmeserver completion powershell | Out-String | Invoke-Expression + fmeflow completion powershell | Out-String | Invoke-Expression To load completions for every new session, add the output of the above command to your powershell profile. ``` -fmeserver completion powershell [flags] +fmeflow completion powershell [flags] ``` ### Options @@ -28,11 +28,11 @@ fmeserver completion powershell [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver completion](fmeserver_completion.md) - Generate the autocompletion script for the specified shell +* [fmeflow completion](fmeflow_completion.md) - Generate the autocompletion script for the specified shell diff --git a/docs/fmeserver_completion_zsh.md b/docs/fmeserver_completion_zsh.md index 3e346f3..e4aa2bd 100644 --- a/docs/fmeserver_completion_zsh.md +++ b/docs/fmeserver_completion_zsh.md @@ -1,4 +1,4 @@ -## fmeserver completion zsh +## fmeflow completion zsh Generate the autocompletion script for zsh @@ -13,23 +13,23 @@ to enable it. You can execute the following once: To load completions in your current shell session: - source <(fmeserver completion zsh); compdef _fmeserver fmeserver + source <(fmeflow completion zsh); compdef _fmeflow fmeflow To load completions for every new session, execute once: #### Linux: - fmeserver completion zsh > "${fpath[1]}/_fmeserver" + fmeflow completion zsh > "${fpath[1]}/_fmeflow" #### macOS: - fmeserver completion zsh > $(brew --prefix)/share/zsh/site-functions/_fmeserver + fmeflow completion zsh > $(brew --prefix)/share/zsh/site-functions/_fmeflow You will need to start a new shell for this setup to take effect. ``` -fmeserver completion zsh [flags] +fmeflow completion zsh [flags] ``` ### Options @@ -42,11 +42,11 @@ fmeserver completion zsh [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver completion](fmeserver_completion.md) - Generate the autocompletion script for the specified shell +* [fmeflow completion](fmeflow_completion.md) - Generate the autocompletion script for the specified shell diff --git a/docs/fmeserver_deploymentparameters.md b/docs/fmeserver_deploymentparameters.md index fceadf1..f63c844 100644 --- a/docs/fmeserver_deploymentparameters.md +++ b/docs/fmeserver_deploymentparameters.md @@ -1,4 +1,4 @@ -## fmeserver deploymentparameters +## fmeflow deploymentparameters List Deployment Parameters @@ -7,7 +7,7 @@ List Deployment Parameters Lists Deployment Parameters on the given FME Server. ``` -fmeserver deploymentparameters [flags] +fmeflow deploymentparameters [flags] ``` ### Examples @@ -16,13 +16,13 @@ fmeserver deploymentparameters [flags] Examples: # List all deployment parameters - fmeserver deploymentparameters + fmeflow deploymentparameters # List a single deployment parameter - fmeserver deploymentparameters --name testParameter + fmeflow deploymentparameters --name testParameter # Output all deploymentparameters in json format - fmeserver deploymentparameters --json + fmeflow deploymentparameters --json ``` ### Options @@ -37,14 +37,14 @@ fmeserver deploymentparameters [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. -* [fmeserver deploymentparameters create](fmeserver_deploymentparameters_create.md) - Create a deployment parameter -* [fmeserver deploymentparameters delete](fmeserver_deploymentparameters_delete.md) - Delete a deployment parameter -* [fmeserver deploymentparameters update](fmeserver_deploymentparameters_update.md) - Update a deployment parameter +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. +* [fmeflow deploymentparameters create](fmeflow_deploymentparameters_create.md) - Create a deployment parameter +* [fmeflow deploymentparameters delete](fmeflow_deploymentparameters_delete.md) - Delete a deployment parameter +* [fmeflow deploymentparameters update](fmeflow_deploymentparameters_update.md) - Update a deployment parameter diff --git a/docs/fmeserver_deploymentparameters_create.md b/docs/fmeserver_deploymentparameters_create.md index 315e4d3..fb5aca6 100644 --- a/docs/fmeserver_deploymentparameters_create.md +++ b/docs/fmeserver_deploymentparameters_create.md @@ -1,4 +1,4 @@ -## fmeserver deploymentparameters create +## fmeflow deploymentparameters create Create a deployment parameter @@ -7,7 +7,7 @@ Create a deployment parameter Create a deployment parameter. ``` -fmeserver deploymentparameters create [flags] +fmeflow deploymentparameters create [flags] ``` ### Examples @@ -16,7 +16,7 @@ fmeserver deploymentparameters create [flags] Examples: # Create a deployment parameter with the name "myParam" and the value "myValue" - fmeserver deploymentparameters create --name myParam --value myValue + fmeflow deploymentparameters create --name myParam --value myValue ``` @@ -31,11 +31,11 @@ fmeserver deploymentparameters create [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver deploymentparameters](fmeserver_deploymentparameters.md) - List Deployment Parameters +* [fmeflow deploymentparameters](fmeflow_deploymentparameters.md) - List Deployment Parameters diff --git a/docs/fmeserver_deploymentparameters_delete.md b/docs/fmeserver_deploymentparameters_delete.md index 189d5e3..42517ca 100644 --- a/docs/fmeserver_deploymentparameters_delete.md +++ b/docs/fmeserver_deploymentparameters_delete.md @@ -1,4 +1,4 @@ -## fmeserver deploymentparameters delete +## fmeflow deploymentparameters delete Delete a deployment parameter @@ -7,7 +7,7 @@ Delete a deployment parameter Delete a deployment parameter. ``` -fmeserver deploymentparameters delete [flags] +fmeflow deploymentparameters delete [flags] ``` ### Examples @@ -16,10 +16,10 @@ fmeserver deploymentparameters delete [flags] Examples: # Delete adeployment parameter with the name "myParam" - fmeserver deploymentparameters delete --name myParam + fmeflow deploymentparameters delete --name myParam # Delete a repository with the name "myRepository" and no confirmation - fmeserver deploymentparameters delete --name myParam --no-prompt + fmeflow deploymentparameters delete --name myParam --no-prompt ``` @@ -34,11 +34,11 @@ fmeserver deploymentparameters delete [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver deploymentparameters](fmeserver_deploymentparameters.md) - List Deployment Parameters +* [fmeflow deploymentparameters](fmeflow_deploymentparameters.md) - List Deployment Parameters diff --git a/docs/fmeserver_deploymentparameters_update.md b/docs/fmeserver_deploymentparameters_update.md index a4b1694..2e43201 100644 --- a/docs/fmeserver_deploymentparameters_update.md +++ b/docs/fmeserver_deploymentparameters_update.md @@ -1,4 +1,4 @@ -## fmeserver deploymentparameters update +## fmeflow deploymentparameters update Update a deployment parameter @@ -7,7 +7,7 @@ Update a deployment parameter Update a deployment parameter. ``` -fmeserver deploymentparameters update [flags] +fmeflow deploymentparameters update [flags] ``` ### Examples @@ -16,7 +16,7 @@ fmeserver deploymentparameters update [flags] Examples: # Update a deployment parameter with the name "myParam" and the value "myValue" - fmeserver deploymentparameters update --name myParam --value myValue + fmeflow deploymentparameters update --name myParam --value myValue ``` @@ -31,11 +31,11 @@ fmeserver deploymentparameters update [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver deploymentparameters](fmeserver_deploymentparameters.md) - List Deployment Parameters +* [fmeflow deploymentparameters](fmeflow_deploymentparameters.md) - List Deployment Parameters diff --git a/docs/fmeserver_engines.md b/docs/fmeserver_engines.md index 63c964e..4cceebb 100644 --- a/docs/fmeserver_engines.md +++ b/docs/fmeserver_engines.md @@ -1,4 +1,4 @@ -## fmeserver engines +## fmeflow engines Get information about the FME Engines @@ -7,7 +7,7 @@ Get information about the FME Engines Gets information and status about FME Engines currently connected to FME Server ``` -fmeserver engines [flags] +fmeflow engines [flags] ``` ### Examples @@ -15,16 +15,16 @@ fmeserver engines [flags] ``` # List all engines - fmeserver engines + fmeflow engines # Output number of engines - fmeserver engines --count + fmeflow engines --count # Output engines in json form - fmeserver engines --json + fmeflow engines --json # Output just the names of the engines with no column headers - fmeserver engines --output=custom-columns=NAME:.instanceName --no-headers + fmeflow engines --output=custom-columns=NAME:.instanceName --no-headers ``` ### Options @@ -39,11 +39,11 @@ fmeserver engines [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. diff --git a/docs/fmeserver_healthcheck.md b/docs/fmeserver_healthcheck.md index 4ae0039..8e5f6fa 100644 --- a/docs/fmeserver_healthcheck.md +++ b/docs/fmeserver_healthcheck.md @@ -1,4 +1,4 @@ -## fmeserver healthcheck +## fmeflow healthcheck Retrieves the health status of FME Server @@ -7,7 +7,7 @@ Retrieves the health status of FME Server Retrieves the health status of FME Server. The health status is normal if the FME Server REST API is responsive. Note that this endpoint does not require authentication. This command can be used without calling the login command first. The FME Server url can be passed in using the --url flag without needing a config file. A config file without a token can also be used. ``` -fmeserver healthcheck [flags] +fmeflow healthcheck [flags] ``` ### Examples @@ -15,26 +15,26 @@ fmeserver healthcheck [flags] ``` # Check if the FME Server is healthy and accepting requests - fmeserver healthcheck + fmeflow healthcheck # Check if the FME Server is healthy and ready to process jobs - fmeserver healthcheck --ready + fmeflow healthcheck --ready # Check if the FME Server is healthy and output in json - fmeserver healthcheck --json + fmeflow healthcheck --json # Check that the FME Server is healthy and output just the status - fmeserver healthcheck --output=custom-columns=STATUS:.status + fmeflow healthcheck --output=custom-columns=STATUS:.status # Check the FME Server is healthy without needing a config file - fmeserver healthcheck --url https://my-fmeserver.internal + fmeflow healthcheck --url https://my-fmeflow.internal # Check the FME Server is healthy with a manually created config file - cat << EOF >fmeserver-cli.yaml + cat << EOF >fmeflow-cli.yaml build: 23235 - url: https://my-fmeserver.internal + url: https://my-fmeflow.internal EOF - fmeserver healthcheck --config fmeserver-cli.yaml + fmeflow healthcheck --config fmeflow-cli.yaml ``` ### Options @@ -50,11 +50,11 @@ fmeserver healthcheck [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. diff --git a/docs/fmeserver_info.md b/docs/fmeserver_info.md index 2c649e9..5e88b56 100644 --- a/docs/fmeserver_info.md +++ b/docs/fmeserver_info.md @@ -1,4 +1,4 @@ -## fmeserver info +## fmeflow info Retrieves build, version and time information about FME Server @@ -7,7 +7,7 @@ Retrieves build, version and time information about FME Server Retrieves build, version and time information about FME Server ``` -fmeserver info [flags] +fmeflow info [flags] ``` ### Examples @@ -15,13 +15,13 @@ fmeserver info [flags] ``` # Output FME Server information in a table - fmeserver info + fmeflow info # Output FME Server information in json - fmeserver info --json + fmeflow info --json # Output just the build string with no column headers - fmeserver info --output=custom-columns="BUILD:.build" --no-headers + fmeflow info --output=custom-columns="BUILD:.build" --no-headers ``` @@ -36,11 +36,11 @@ fmeserver info [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. diff --git a/docs/fmeserver_jobs.md b/docs/fmeserver_jobs.md index 1d58cb9..0ab36c3 100644 --- a/docs/fmeserver_jobs.md +++ b/docs/fmeserver_jobs.md @@ -1,4 +1,4 @@ -## fmeserver jobs +## fmeflow jobs Lists jobs on FME Server @@ -7,7 +7,7 @@ Lists jobs on FME Server Lists running, queued, and/or queued jobs on FME Server. Pass in a job id to get information on a specific job. ``` -fmeserver jobs [flags] +fmeflow jobs [flags] ``` ### Examples @@ -15,22 +15,22 @@ fmeserver jobs [flags] ``` # List all jobs (currently limited to the most recent 1000) - fmeserver jobs --all + fmeflow jobs --all # List all running jobs - fmeserver jobs --running + fmeflow jobs --running # List all jobs from a given repository - fmeserver jobs --repository Samples + fmeflow jobs --repository Samples # List all jobs that ran a given workspace - fmeserver jobs --repository Samples --workspace austinApartments.fmw + fmeflow jobs --repository Samples --workspace austinApartments.fmw # List all jobs in JSON format - fmeserver jobs --json + fmeflow jobs --json # List the workspace, CPU time and peak memory usage for a given repository - fmeserver jobs --repository Samples --output="custom-columns=WORKSPACE:.workspace,CPU Time:.cpuTime,Peak Memory:.peakMemUsage" + fmeflow jobs --repository Samples --output="custom-columns=WORKSPACE:.workspace,CPU Time:.cpuTime,Peak Memory:.peakMemUsage" ``` @@ -56,11 +56,11 @@ fmeserver jobs [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. diff --git a/docs/fmeserver_license.md b/docs/fmeserver_license.md index 027d9f5..b05a941 100644 --- a/docs/fmeserver_license.md +++ b/docs/fmeserver_license.md @@ -1,4 +1,4 @@ -## fmeserver license +## fmeflow license Interact with licensing an FME Server @@ -16,17 +16,17 @@ Contains several subcommands for licensing tasks related to FME Server. ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. -* [fmeserver license machinekey](fmeserver_license_machinekey.md) - Retrieves machine key of the machine running FME Server. -* [fmeserver license refresh](fmeserver_license_refresh.md) - Refreshes the installed license file with a current license from Safe Software. -* [fmeserver license request](fmeserver_license_request.md) - Request a license from the FME Server licensing server -* [fmeserver license requestfile](fmeserver_license_requestfile.md) - Generates a JSON file for requesting a FME Server license file. -* [fmeserver license status](fmeserver_license_status.md) - Retrieves status of the installed FME Server license. -* [fmeserver license systemcode](fmeserver_license_systemcode.md) - Retrieves system code of the machine running FME Server. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. +* [fmeflow license machinekey](fmeflow_license_machinekey.md) - Retrieves machine key of the machine running FME Server. +* [fmeflow license refresh](fmeflow_license_refresh.md) - Refreshes the installed license file with a current license from Safe Software. +* [fmeflow license request](fmeflow_license_request.md) - Request a license from the FME Server licensing server +* [fmeflow license requestfile](fmeflow_license_requestfile.md) - Generates a JSON file for requesting a FME Server license file. +* [fmeflow license status](fmeflow_license_status.md) - Retrieves status of the installed FME Server license. +* [fmeflow license systemcode](fmeflow_license_systemcode.md) - Retrieves system code of the machine running FME Server. diff --git a/docs/fmeserver_license_machinekey.md b/docs/fmeserver_license_machinekey.md index 3eb2e42..30842ea 100644 --- a/docs/fmeserver_license_machinekey.md +++ b/docs/fmeserver_license_machinekey.md @@ -1,4 +1,4 @@ -## fmeserver license machinekey +## fmeflow license machinekey Retrieves machine key of the machine running FME Server. @@ -7,7 +7,7 @@ Retrieves machine key of the machine running FME Server. Retrieves machine key of the machine running FME Server. ``` -fmeserver license machinekey [flags] +fmeflow license machinekey [flags] ``` ### Options @@ -19,11 +19,11 @@ fmeserver license machinekey [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver license](fmeserver_license.md) - Interact with licensing an FME Server +* [fmeflow license](fmeflow_license.md) - Interact with licensing an FME Server diff --git a/docs/fmeserver_license_refresh.md b/docs/fmeserver_license_refresh.md index cbdaa7f..c1122fc 100644 --- a/docs/fmeserver_license_refresh.md +++ b/docs/fmeserver_license_refresh.md @@ -1,4 +1,4 @@ -## fmeserver license refresh +## fmeflow license refresh Refreshes the installed license file with a current license from Safe Software. @@ -7,7 +7,7 @@ Refreshes the installed license file with a current license from Safe Software. Refreshes the installed license file with a current license from Safe Software. ``` -fmeserver license refresh [flags] +fmeflow license refresh [flags] ``` ### Examples @@ -15,7 +15,7 @@ fmeserver license refresh [flags] ``` # Refresh the license - fmeserver license refresh + fmeflow license refresh ``` ### Options @@ -28,12 +28,12 @@ fmeserver license refresh [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver license](fmeserver_license.md) - Interact with licensing an FME Server -* [fmeserver license refresh status](fmeserver_license_refresh_status.md) - Check the status of a license refresh request. +* [fmeflow license](fmeflow_license.md) - Interact with licensing an FME Server +* [fmeflow license refresh status](fmeflow_license_refresh_status.md) - Check the status of a license refresh request. diff --git a/docs/fmeserver_license_refresh_status.md b/docs/fmeserver_license_refresh_status.md index 0c441b6..f69aa98 100644 --- a/docs/fmeserver_license_refresh_status.md +++ b/docs/fmeserver_license_refresh_status.md @@ -1,4 +1,4 @@ -## fmeserver license refresh status +## fmeflow license refresh status Check the status of a license refresh request. @@ -7,7 +7,7 @@ Check the status of a license refresh request. Check the status of a license refresh request. ``` -fmeserver license refresh status [flags] +fmeflow license refresh status [flags] ``` ### Examples @@ -15,13 +15,13 @@ fmeserver license refresh status [flags] ``` # Output the license refresh status as a table - fmeserver license refresh status + fmeflow license refresh status # Output the license refresh status in json - fmeserver license refresh status --json + fmeflow license refresh status --json # Output just the status message - fmeserver license refresh status --output custom-columns=STATUS:.status --no-headers + fmeflow license refresh status --output custom-columns=STATUS:.status --no-headers ``` ### Options @@ -35,11 +35,11 @@ fmeserver license refresh status [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver license refresh](fmeserver_license_refresh.md) - Refreshes the installed license file with a current license from Safe Software. +* [fmeflow license refresh](fmeflow_license_refresh.md) - Refreshes the installed license file with a current license from Safe Software. diff --git a/docs/fmeserver_license_request.md b/docs/fmeserver_license_request.md index 3e5d4c4..e32921e 100644 --- a/docs/fmeserver_license_request.md +++ b/docs/fmeserver_license_request.md @@ -1,4 +1,4 @@ -## fmeserver license request +## fmeflow license request Request a license from the FME Server licensing server @@ -8,7 +8,7 @@ Request a license file from the FME Server licensing server. First name, Last na If no serial number is passed in, a trial license will be requested. ``` -fmeserver license request [flags] +fmeflow license request [flags] ``` ### Examples @@ -16,10 +16,10 @@ fmeserver license request [flags] ``` # Request a trial license and wait for it to be downloaded and installed - fmeserver license request --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." --wait + fmeflow license request --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." --wait # Request a license with a serial number - fmeserver license request --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." --serial-number "AAAA-BBBB-CCCC" + fmeflow license request --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." --serial-number "AAAA-BBBB-CCCC" ``` @@ -42,12 +42,12 @@ fmeserver license request [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver license](fmeserver_license.md) - Interact with licensing an FME Server -* [fmeserver license request status](fmeserver_license_request_status.md) - Check the status of a license request. +* [fmeflow license](fmeflow_license.md) - Interact with licensing an FME Server +* [fmeflow license request status](fmeflow_license_request_status.md) - Check the status of a license request. diff --git a/docs/fmeserver_license_request_status.md b/docs/fmeserver_license_request_status.md index aa7d340..0dad422 100644 --- a/docs/fmeserver_license_request_status.md +++ b/docs/fmeserver_license_request_status.md @@ -1,4 +1,4 @@ -## fmeserver license request status +## fmeflow license request status Check the status of a license request. @@ -7,7 +7,7 @@ Check the status of a license request. Check the status of a license request. ``` -fmeserver license request status [flags] +fmeflow license request status [flags] ``` ### Examples @@ -15,13 +15,13 @@ fmeserver license request status [flags] ``` # Output the license request status as a table - fmeserver license request status + fmeflow license request status # Output the license Request status in json - fmeserver license request status --json + fmeflow license request status --json # Output just the status message - fmeserver license request status --output custom-columns=STATUS:.status --no-headers + fmeflow license request status --output custom-columns=STATUS:.status --no-headers ``` ### Options @@ -35,11 +35,11 @@ fmeserver license request status [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver license request](fmeserver_license_request.md) - Request a license from the FME Server licensing server +* [fmeflow license request](fmeflow_license_request.md) - Request a license from the FME Server licensing server diff --git a/docs/fmeserver_license_requestfile.md b/docs/fmeserver_license_requestfile.md index f59f3b5..c2bf74f 100644 --- a/docs/fmeserver_license_requestfile.md +++ b/docs/fmeserver_license_requestfile.md @@ -1,4 +1,4 @@ -## fmeserver license requestfile +## fmeflow license requestfile Generates a JSON file for requesting a FME Server license file. @@ -9,13 +9,13 @@ Generates a JSON file for requesting a FME Server license file. Example: # Generate a license request file and output to the console - fmeserver license requestfile --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." + fmeflow license requestfile --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." # Generate a license request file and output to a local file - fmeserver license requestfile --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." --file my-request-file.json + fmeflow license requestfile --first-name "Billy" --last-name "Bob" --email "billy.bob@example.com" --company "Example Company Inc." --file my-request-file.json ``` -fmeserver license requestfile [flags] +fmeflow license requestfile [flags] ``` ### Options @@ -37,11 +37,11 @@ fmeserver license requestfile [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver license](fmeserver_license.md) - Interact with licensing an FME Server +* [fmeflow license](fmeflow_license.md) - Interact with licensing an FME Server diff --git a/docs/fmeserver_license_status.md b/docs/fmeserver_license_status.md index 68ebb45..56eb196 100644 --- a/docs/fmeserver_license_status.md +++ b/docs/fmeserver_license_status.md @@ -1,4 +1,4 @@ -## fmeserver license status +## fmeflow license status Retrieves status of the installed FME Server license. @@ -7,7 +7,7 @@ Retrieves status of the installed FME Server license. Retrieves status of the installed FME Server license. ``` -fmeserver license status [flags] +fmeflow license status [flags] ``` ### Options @@ -21,11 +21,11 @@ fmeserver license status [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver license](fmeserver_license.md) - Interact with licensing an FME Server +* [fmeflow license](fmeflow_license.md) - Interact with licensing an FME Server diff --git a/docs/fmeserver_license_systemcode.md b/docs/fmeserver_license_systemcode.md index b227489..921305a 100644 --- a/docs/fmeserver_license_systemcode.md +++ b/docs/fmeserver_license_systemcode.md @@ -1,4 +1,4 @@ -## fmeserver license systemcode +## fmeflow license systemcode Retrieves system code of the machine running FME Server. @@ -7,7 +7,7 @@ Retrieves system code of the machine running FME Server. Retrieves system code of the machine running FME Server. ``` -fmeserver license systemcode [flags] +fmeflow license systemcode [flags] ``` ### Options @@ -19,11 +19,11 @@ fmeserver license systemcode [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver license](fmeserver_license.md) - Interact with licensing an FME Server +* [fmeflow license](fmeflow_license.md) - Interact with licensing an FME Server diff --git a/docs/fmeserver_login.md b/docs/fmeserver_login.md index d829879..691d9ea 100644 --- a/docs/fmeserver_login.md +++ b/docs/fmeserver_login.md @@ -1,4 +1,4 @@ -## fmeserver login +## fmeflow login Save credentials for an FME Server @@ -9,7 +9,7 @@ Update the config file with the credentials to connect to FME Server. If just a This will overwrite any existing credentials saved. ``` -fmeserver login [URL] [flags] +fmeflow login [URL] [flags] ``` ### Examples @@ -17,13 +17,13 @@ fmeserver login [URL] [flags] ``` # Prompt for user and password for the given FME Server URL - fmeserver login https://my-fmeserver.internal + fmeflow login https://my-fmeflow.internal # Login to an FME Server using a pre-generated token - fmeserver login https://my-fmeserver.internal --token 5937391ad3a87f19ba14dc6082867373087d031b + fmeflow login https://my-fmeflow.internal --token 5937391ad3a87f19ba14dc6082867373087d031b # Login to an FME Server using a passed in user and password file (The password is contained in a file at the path /path/to/password-file) - fmeserver login https://my-fmeserver.internal --user admin --password-file /path/to/password-file + fmeflow login https://my-fmeflow.internal --user admin --password-file /path/to/password-file ``` ### Options @@ -39,11 +39,11 @@ fmeserver login [URL] [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. diff --git a/docs/fmeserver_migration.md b/docs/fmeserver_migration.md index 5434514..6a9bd46 100644 --- a/docs/fmeserver_migration.md +++ b/docs/fmeserver_migration.md @@ -1,4 +1,4 @@ -## fmeserver migration +## fmeflow migration Returns information on migration tasks using the tasks subcommand. @@ -15,12 +15,12 @@ Returns information on migration tasks using the tasks subcommand. ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. -* [fmeserver migration tasks](fmeserver_migration_tasks.md) - Retrieves the records for migration tasks. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. +* [fmeflow migration tasks](fmeflow_migration_tasks.md) - Retrieves the records for migration tasks. diff --git a/docs/fmeserver_migration_tasks.md b/docs/fmeserver_migration_tasks.md index 22c97d0..9500c42 100644 --- a/docs/fmeserver_migration_tasks.md +++ b/docs/fmeserver_migration_tasks.md @@ -1,4 +1,4 @@ -## fmeserver migration tasks +## fmeflow migration tasks Retrieves the records for migration tasks. @@ -7,7 +7,7 @@ Retrieves the records for migration tasks. Retrieves the records for migration tasks. Get all migration tasks or for a specific task by passing in the id. ``` -fmeserver migration tasks [flags] +fmeflow migration tasks [flags] ``` ### Examples @@ -15,22 +15,22 @@ fmeserver migration tasks [flags] ``` # Get all migration tasks - fmeserver migration tasks + fmeflow migration tasks # Get all migration tasks in json - fmeserver migration tasks --json + fmeflow migration tasks --json # Get the migration task for a given id - fmeserver migration tasks --id 1 + fmeflow migration tasks --id 1 # Output the migration log for a given id to the console - fmeserver migration tasks --id 1 --log + fmeflow migration tasks --id 1 --log # Output the migration log for a given id to a local file - fmeserver migration tasks --id 1 --log --file my-backup-log.txt + fmeflow migration tasks --id 1 --log --file my-backup-log.txt # Output just the start and end time of the a given id - fmeserver migration tasks --id 1 --output="custom-columns=Start Time:.startDate,End Time:.finishedDate" + fmeflow migration tasks --id 1 --output="custom-columns=Start Time:.startDate,End Time:.finishedDate" ``` ### Options @@ -47,11 +47,11 @@ fmeserver migration tasks [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver migration](fmeserver_migration.md) - Returns information on migration tasks using the tasks subcommand. +* [fmeflow migration](fmeflow_migration.md) - Returns information on migration tasks using the tasks subcommand. diff --git a/docs/fmeserver_projects.md b/docs/fmeserver_projects.md index 75b84ca..0c103c2 100644 --- a/docs/fmeserver_projects.md +++ b/docs/fmeserver_projects.md @@ -1,4 +1,4 @@ -## fmeserver projects +## fmeflow projects Lists projects on the FME Server @@ -7,7 +7,7 @@ Lists projects on the FME Server Lists projects on the FME Server. Pass in a name to retrieve information on a single project. ``` -fmeserver projects [flags] +fmeflow projects [flags] ``` ### Examples @@ -15,10 +15,10 @@ fmeserver projects [flags] ``` # List all projects - fmeserver projects + fmeflow projects # List all projects owned by the user admin - fmeserver projects --owner admin + fmeflow projects --owner admin ``` ### Options @@ -34,13 +34,13 @@ fmeserver projects [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. -* [fmeserver projects download](fmeserver_projects_download.md) - Downloads an FME Server Project -* [fmeserver projects upload](fmeserver_projects_upload.md) - Imports FME Server Projects from a downloaded package. +* [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. diff --git a/docs/fmeserver_projects_download.md b/docs/fmeserver_projects_download.md index 4d66dce..c7c4eed 100644 --- a/docs/fmeserver_projects_download.md +++ b/docs/fmeserver_projects_download.md @@ -1,4 +1,4 @@ -## fmeserver projects download +## fmeflow projects download Downloads an FME Server Project @@ -7,7 +7,7 @@ Downloads an FME Server Project Downloads an FME Server Project to a local file. Useful for backing up or moving a project to another FME Server. ``` -fmeserver projects download [flags] +fmeflow projects download [flags] ``` ### Examples @@ -15,10 +15,10 @@ fmeserver projects download [flags] ``` # download a project named "Test Project" to a local file with default name - fmeserver projects download --name "Test Project" + fmeflow projects download --name "Test Project" # download a project named "Test Project" to a local file named MyProject.fsproject - fmeserver projects download --name "Test Project" -f MyProject.fsproject + fmeflow projects download --name "Test Project" -f MyProject.fsproject ``` ### Options @@ -33,11 +33,11 @@ fmeserver projects download [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver projects](fmeserver_projects.md) - Lists projects on the FME Server +* [fmeflow projects](fmeflow_projects.md) - Lists projects on the FME Server diff --git a/docs/fmeserver_projects_upload.md b/docs/fmeserver_projects_upload.md index ab4494f..2b0a28c 100644 --- a/docs/fmeserver_projects_upload.md +++ b/docs/fmeserver_projects_upload.md @@ -1,4 +1,4 @@ -## fmeserver projects upload +## fmeflow projects upload Imports FME Server Projects from a downloaded package. @@ -7,7 +7,7 @@ Imports FME Server Projects from a downloaded package. Imports FME Server Projects from a downloaded package. Useful for moving a project from one FME Server to another. ``` -fmeserver projects upload [flags] +fmeflow projects upload [flags] ``` ### Examples @@ -15,10 +15,10 @@ fmeserver projects upload [flags] ``` # Restore from a backup in a local file - fmeserver projects upload --file ProjectPackage.fsproject + fmeflow projects upload --file ProjectPackage.fsproject # Restore from a backup in a local file using UPDATE mode - fmeserver projects upload --file ProjectPackage.fsproject --import-mode UPDATE + fmeflow projects upload --file ProjectPackage.fsproject --import-mode UPDATE ``` ### Options @@ -35,11 +35,11 @@ fmeserver projects upload [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver projects](fmeserver_projects.md) - Lists projects on the FME Server +* [fmeflow projects](fmeflow_projects.md) - Lists projects on the FME Server diff --git a/docs/fmeserver_repositories.md b/docs/fmeserver_repositories.md index e1b112a..18ea32a 100644 --- a/docs/fmeserver_repositories.md +++ b/docs/fmeserver_repositories.md @@ -1,4 +1,4 @@ -## fmeserver repositories +## fmeflow repositories List repositories @@ -7,7 +7,7 @@ List repositories Lists repositories on the given FME Server. Pass in a name to get information on a specific repository. ``` -fmeserver repositories [flags] +fmeflow repositories [flags] ``` ### Examples @@ -16,19 +16,19 @@ fmeserver repositories [flags] Examples: # List all repositories - fmeserver repositories + fmeflow repositories # List all repositories owned by the admin user - fmeserver repositories --owner admin + fmeflow repositories --owner admin # List a single repository with the name "Samples" - fmeserver repositories --name Samples + fmeflow repositories --name Samples # Output just the name of all the repositories - fmeserver repositories --output=custom-columns=NAME:.name --no-headers + fmeflow repositories --output=custom-columns=NAME:.name --no-headers # Output all repositories in json format - fmeserver repositories --json + fmeflow repositories --json ``` ### Options @@ -45,13 +45,13 @@ fmeserver repositories [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. -* [fmeserver repositories create](fmeserver_repositories_create.md) - Create a new repository. -* [fmeserver repositories delete](fmeserver_repositories_delete.md) - Delete a repository. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. +* [fmeflow repositories create](fmeflow_repositories_create.md) - Create a new repository. +* [fmeflow repositories delete](fmeflow_repositories_delete.md) - Delete a repository. diff --git a/docs/fmeserver_repositories_create.md b/docs/fmeserver_repositories_create.md index 82c0561..fd82bee 100644 --- a/docs/fmeserver_repositories_create.md +++ b/docs/fmeserver_repositories_create.md @@ -1,4 +1,4 @@ -## fmeserver repositories create +## fmeflow repositories create Create a new repository. @@ -7,7 +7,7 @@ Create a new repository. Create a new repository. ``` -fmeserver repositories create [flags] +fmeflow repositories create [flags] ``` ### Examples @@ -16,10 +16,10 @@ fmeserver repositories create [flags] Examples: # Create a repository with the name "myRepository" and no description - fmeserver repositories create --name myRepository + fmeflow repositories create --name myRepository # Output just the name of all the repositories - fmeserver repositories create --name myRepository --description "This is my new repository" + fmeflow repositories create --name myRepository --description "This is my new repository" ``` @@ -34,11 +34,11 @@ fmeserver repositories create [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver repositories](fmeserver_repositories.md) - List repositories +* [fmeflow repositories](fmeflow_repositories.md) - List repositories diff --git a/docs/fmeserver_repositories_delete.md b/docs/fmeserver_repositories_delete.md index 8cfce64..0b68194 100644 --- a/docs/fmeserver_repositories_delete.md +++ b/docs/fmeserver_repositories_delete.md @@ -1,4 +1,4 @@ -## fmeserver repositories delete +## fmeflow repositories delete Delete a repository. @@ -7,7 +7,7 @@ Delete a repository. Delete a repository. ``` -fmeserver repositories delete [flags] +fmeflow repositories delete [flags] ``` ### Examples @@ -16,10 +16,10 @@ fmeserver repositories delete [flags] Examples: # Delete a repository with the name "myRepository" - fmeserver repositories delete --name myRepository + fmeflow repositories delete --name myRepository # Delete a repository with the name "myRepository" and no confirmation - fmeserver repositories delete --name myRepository --no-prompt + fmeflow repositories delete --name myRepository --no-prompt ``` @@ -34,11 +34,11 @@ fmeserver repositories delete [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver repositories](fmeserver_repositories.md) - List repositories +* [fmeflow repositories](fmeflow_repositories.md) - List repositories diff --git a/docs/fmeserver_restore.md b/docs/fmeserver_restore.md index 6ec79ca..9788bf3 100644 --- a/docs/fmeserver_restore.md +++ b/docs/fmeserver_restore.md @@ -1,4 +1,4 @@ -## fmeserver restore +## fmeflow restore Restores the FME Server configuration from an import package @@ -7,7 +7,7 @@ Restores the FME Server configuration from an import package Restores the FME Server configuration from an import package ``` -fmeserver restore [flags] +fmeflow restore [flags] ``` ### Examples @@ -15,16 +15,16 @@ fmeserver restore [flags] ``` # Restore from a backup in a local file - fmeserver restore --file ServerConfigPackage.fsconfig + fmeflow restore --file ServerConfigPackage.fsconfig # Restore from a backup in a local file using UPDATE mode - fmeserver restore --file ServerConfigPackage.fsconfig --import-mode UPDATE + fmeflow restore --file ServerConfigPackage.fsconfig --import-mode UPDATE # Restore from a backup file stored in the Backup resource folder (FME_SHAREDRESOURCE_BACKUP) named ServerConfigPackage.fsconfig - fmeserver restore --resource --file ServerConfigPackage.fsconfig + fmeflow restore --resource --file ServerConfigPackage.fsconfig # Restore from a backup file stored in the Data resource folder (FME_SHAREDRESOURCE_DATA) named ServerConfigPackage.fsconfig and set a failure and success topic to notify - fmeserver restore --resource --resource-name FME_SHAREDRESOURCE_DATA --file ServerConfigPackage.fsconfig --failure-topic MY_FAILURE_TOPIC --success-topic MY_SUCCESS_TOPIC + fmeflow restore --resource --resource-name FME_SHAREDRESOURCE_DATA --file ServerConfigPackage.fsconfig --failure-topic MY_FAILURE_TOPIC --success-topic MY_SUCCESS_TOPIC ``` @@ -45,11 +45,11 @@ fmeserver restore [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. diff --git a/docs/fmeserver_run.md b/docs/fmeserver_run.md index 415174e..f4f41f3 100644 --- a/docs/fmeserver_run.md +++ b/docs/fmeserver_run.md @@ -1,4 +1,4 @@ -## fmeserver run +## fmeflow run Run a workspace on FME Server. @@ -8,25 +8,25 @@ Run a workspace on FME Server. Examples: # Submit a job asynchronously - fmeserver run --repository Samples --workspace austinApartments.fmw + fmeflow run --repository Samples --workspace austinApartments.fmw # Submit a job and wait for it to complete - fmeserver run --repository Samples --workspace austinApartments.fmw --wait + fmeflow run --repository Samples --workspace austinApartments.fmw --wait # Submit a job to a specific queue and set a time to live in the queue - fmeserver run --repository Samples --workspace austinApartments.fmw --tag Queue1 --time-to-live 120 + fmeflow run --repository Samples --workspace austinApartments.fmw --tag Queue1 --time-to-live 120 # Submit a job and pass in a few published parameters - fmeserver run --repository Samples --workspace austinDownload.fmw --published-parameter-list THEMES=railroad,airports --published-parameter COORDSYS=TX83-CF + fmeflow run --repository Samples --workspace austinDownload.fmw --published-parameter-list THEMES=railroad,airports --published-parameter COORDSYS=TX83-CF # Submit a job, wait for it to complete, and customize the output - fmeserver run --repository Samples --workspace austinApartments.fmw --wait --output="custom-columns=Time Requested:.timeRequested,Time Started:.timeStarted,Time Finished:.timeFinished" + fmeflow run --repository Samples --workspace austinApartments.fmw --wait --output="custom-columns=Time Requested:.timeRequested,Time Started:.timeStarted,Time Finished:.timeFinished" # Upload a local file to use as the source data for the translation - fmeserver run --repository Samples --workspace austinApartments.fmw --file Landmarks-edited.sqlite --wait + fmeflow run --repository Samples --workspace austinApartments.fmw --file Landmarks-edited.sqlite --wait ``` -fmeserver run [flags] +fmeflow run [flags] ``` ### Options @@ -54,11 +54,11 @@ fmeserver run [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. diff --git a/docs/fmeserver_workspaces.md b/docs/fmeserver_workspaces.md index 0a0b71c..f822e47 100644 --- a/docs/fmeserver_workspaces.md +++ b/docs/fmeserver_workspaces.md @@ -1,4 +1,4 @@ -## fmeserver workspaces +## fmeflow workspaces List workspaces. @@ -7,7 +7,7 @@ List workspaces. Lists workspaces that exist on the FME Server. Filter by repository, specify a name to retrieve a specific workspace, or specify a filter string to narrow down by name or title. ``` -fmeserver workspaces [flags] +fmeflow workspaces [flags] ``` ### Examples @@ -16,22 +16,22 @@ fmeserver workspaces [flags] Examples: # List all workspaces on the FME Server - fmeserver workspaces + fmeflow workspaces # List all workspaces in Samples repository - fmeserver workspaces --repository Samples + fmeflow workspaces --repository Samples # List all workspaces in the Samples repository and output it in json - fmeserver workspaces --repository Samples --json + fmeflow workspaces --repository Samples --json # List all workspaces in the Samples repository with custom columns showing the last publish date and number of times run - fmeserver workspaces --repository Samples --output="custom-columns=NAME:.name,PUBLISH DATE:.lastPublishDate,TOTAL RUNS:.totalRuns" + fmeflow workspaces --repository Samples --output="custom-columns=NAME:.name,PUBLISH DATE:.lastPublishDate,TOTAL RUNS:.totalRuns" # Get information on a single workspace - fmeserver workspaces --repository Samples --name austinApartments.fmw + fmeflow workspaces --repository Samples --name austinApartments.fmw # Get the name, source format, and destination format for this workspace - fmeserver workspaces --repository Samples --name austinApartments.fmw --output=custom-columns=NAME:.name,SOURCE:.datasets.source[*].format,DEST:.datasets.destination[*].format + fmeflow workspaces --repository Samples --name austinApartments.fmw --output=custom-columns=NAME:.name,SOURCE:.datasets.source[*].format,DEST:.datasets.destination[*].format ``` ### Options @@ -48,11 +48,11 @@ fmeserver workspaces [flags] ### Options inherited from parent commands ``` - --config string config file (default is $HOME/.config/.fmeserver-cli.yaml) + --config string config file (default is $HOME/.config/.fmeflow-cli.yaml) --json Output JSON ``` ### SEE ALSO -* [fmeserver](fmeserver.md) - A command line interface for interacting with FME Server. +* [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. diff --git a/go.mod b/go.mod index 9bcbcec..eac12b6 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/safesoftware/fmeserver-cli +module github.com/safesoftware/fmeflow-cli go 1.19 diff --git a/main.go b/main.go index eec3f2f..7b69bce 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/safesoftware/fmeserver-cli/cmd" + "github.com/safesoftware/fmeflow-cli/cmd" ) func main() {