Skip to content

Commit 391fa8a

Browse files
Update license command headers for new character requirements (#159)
## Change Description <!-- Use this section to describe or list, at a high level, the changes contained in the PR. Can be in a concise format as you would see on a changelog. --> * Update license command set headers for newly implemented character requirements for license server * Fixes Error :`Failed to execute pingcli: failed to run license request: license request failed with status 400: {"error":"Invalid format for devops-app. Expected: App identifier: alphanumeric, dots, underscores, and hyphens allowed. Example: pingauthorize-alpine_3.15.4-al11-8.3.0.5-220504-db8c or 10.3.0.1-alpine_3.22.2-al17. Format is not strictly enforced; any combination of allowed characters is accepted."}` * Fixes Error: `ERROR: Failed to execute pingcli: failed to run license request: license request failed with status 400: {"error":"Header too long: devops-purpose (max 13 characters)"}` ## Change Characteristics - [ ] **This PR contains beta functionality** - [ ] **This PR requires introduction of breaking changes** ## Checklist <!-- Please check off completed items. --> _All full (or complete) PRs that need review prior to merge should have the following box checked._ _If contributing a partial or incomplete change (expecting the development team to complete the remaining work) please leave the box unchecked_ - [X] **Check to confirm**: I have performed a review of my PR against the [PR checklist](../contributing/pr-checklist.md) and confirm that: - Changes have proper unit and acceptance test coverage (including regression tests) - Impacted command, parameter and flag descriptions have been reviewed and updated - Impacted command examples have been reviewed and updated - Impacted documentation files have been reviewed and updated - Does not introduce breaking changes to commands, parameters or flags (unless required to do so) - I am aware that changes to generated code may not be merged ## Required SDK Upgrades <!-- Use this section to describe or list any dependencies, and the required version, that need upgrading in the provider prior to merge. --> <!-- N/a Example: - `https://github.com/pingidentity/pingone-go-client` `v0.5.0` --> ## Testing This PR has been tested with: - [ ] Unit tests _(please paste commands and results below)_ - [ ] Acceptance tests _(please paste commands and results below)_ - [ ] End-to-end tests _(please paste the link to the actions workflow runs)_ - [ ] Not applicable _(no evidences needed)_ ### Shell Command(s) <!-- Use the following shell block to paste the command used when testing. --> ```shell pingcli license -p <product> -v <version> -k <user_key> -u <user_id> ``` ### Testing Results <!-- Use the following shell block to paste the results from the testing command(s) used above --> <details> <summary>Expand Results</summary> ```shell ID=<id> Product=<product> Version=<version> EnforcementType=<enforcement type> Tier=<tier> IssueDate=<issue date> ExpirationDate=<expiration date> GracePeriod=<grace period> DeploymentMethod=<deployment method> Organization=<organization> SignCode=<sign code> Signature=<signature> ``` </details> ### End-to-end Tests Workflow Links <!-- Use the following section to list the URLs to the end-to-end test action workflow runs --> - N/a --------- Co-authored-by: Henry Recker <henryrecker@pingidentity.com>
1 parent f8e1ec2 commit 391fa8a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.changelog/pr-159.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
fix request failure in license command
3+
```

internal/commands/license/license_internal.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ func runLicenseRequest(ctx context.Context, product, version, devopsUser, devops
8686

8787
req.Header.Set("Devops-User", devopsUser)
8888
req.Header.Set("Devops-Key", devopsKey)
89-
req.Header.Set("Devops-App", "Ping CLI")
90-
req.Header.Set("Devops-Purpose", "download-license")
89+
req.Header.Set("Devops-App", "PingCLI")
90+
req.Header.Set("Devops-Purpose", "get-license")
9191
req.Header.Set("Product", product)
9292
req.Header.Set("Version", version)
9393

0 commit comments

Comments
 (0)