From a10a9071f9ba6d4b92905de451d9fe79b82334f0 Mon Sep 17 00:00:00 2001 From: Luis Presuel Date: Tue, 28 May 2024 10:34:14 -0600 Subject: [PATCH 1/3] adds certificate ID File flags for provisioning in VCert CLI --- README-CLI-CLOUD.md | 23 ++++++++++---------- cmd/vcert/args.go | 1 + cmd/vcert/cmdCloudKeystores.go | 39 ++++++++++++++++++++++++---------- cmd/vcert/flags.go | 8 +++++++ cmd/vcert/validators.go | 13 ++++++++++-- 5 files changed, 60 insertions(+), 24 deletions(-) diff --git a/README-CLI-CLOUD.md b/README-CLI-CLOUD.md index 1ea594e9..7c088b9a 100644 --- a/README-CLI-CLOUD.md +++ b/README-CLI-CLOUD.md @@ -229,17 +229,18 @@ vcert provisioning cloudkeystore -p vcp -t [--certificate-id Date: Tue, 28 May 2024 11:52:28 -0600 Subject: [PATCH 2/3] rearranges flags in documentation so they are in alphabetical order --- README-CLI-CLOUD.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README-CLI-CLOUD.md b/README-CLI-CLOUD.md index 7c088b9a..e7034cb7 100644 --- a/README-CLI-CLOUD.md +++ b/README-CLI-CLOUD.md @@ -233,14 +233,14 @@ Options: |-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `--certificate-id` | The id of the certificate to be provisioned to a cloud keystore. | | `--certificate-id-file` | Use to specify a file name that contains the unique identifier of the certificate. Required when `--certificate-id` is not specified. | -| `--pickup-id` | Use to specify the unique identifier of the certificate returned by the enroll or renew actions. Required when `--pickup-id-file` is not specified. | -| `--pickup-id-file` | Use to specify a file name that contains the unique identifier of the certificate returned by the enroll or renew actions if --no-pickup was used or a timeout occurred. Required when `--pickup-id` is not specified. | | `--certificate-name` | Use to specify Cloud Keystore Certificate Name if it supports it | -| `--keystore-id` | The id of the cloud keystore where the certificate will be provisioned. | -| `--provider-name` | The name of the cloud provider which owns the cloud keystore where the certificate will be provisioned. Must be set along with keystore-name flag. | -| `--keystore-name` | The name of the cloud keystore where the certificate will be provisioned. Must be set along with provider-name flag. | | `--file` | Use to specify a file name and a location where the output should be written. Example: --file /path-to/provision-output | | `--format` | The format of the operation output: text or JSON. Defaults to text. | +| `--keystore-id` | The id of the cloud keystore where the certificate will be provisioned. | +| `--keystore-name` | The name of the cloud keystore where the certificate will be provisioned. Must be set along with provider-name flag. | +| `--pickup-id-file` | Use to specify a file name that contains the unique identifier of the certificate returned by the enroll or renew actions if --no-pickup was used or a timeout occurred. Required when `--pickup-id` is not specified. | +| `--pickup-id` | Use to specify the unique identifier of the certificate returned by the enroll or renew actions. Required when `--pickup-id-file` is not specified. | +| `--provider-name` | The name of the cloud provider which owns the cloud keystore where the certificate will be provisioned. Must be set along with keystore-name flag. | ## Parameters for Applying Certificate Policy API key: From 65cf690f8b47cb5394d80e6a422877bef69e473f Mon Sep 17 00:00:00 2001 From: Luis Presuel Date: Tue, 28 May 2024 12:05:06 -0600 Subject: [PATCH 3/3] removes unneeded debug print --- cmd/vcert/cmdCloudKeystores.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/vcert/cmdCloudKeystores.go b/cmd/vcert/cmdCloudKeystores.go index 4aa13829..6da6793e 100644 --- a/cmd/vcert/cmdCloudKeystores.go +++ b/cmd/vcert/cmdCloudKeystores.go @@ -95,7 +95,6 @@ func doCommandProvisionCloudKeystore(c *cli.Context) error { func gettingIDsFromFiles(flags *commandFlags) (*commandFlags, error) { if flags.pickupIDFile != "" { - fmt.Printf("pickupIDFILE is not empty string") bytes, err := os.ReadFile(flags.pickupIDFile) if err != nil { return nil, fmt.Errorf("failed to read Pickup ID value: %s", err)