From c1ca989d409aa6a270c1c8794d31c7ae3d468cf2 Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Wed, 16 Oct 2024 13:32:51 -0400 Subject: [PATCH 1/5] chore: show component command in lacework --help --- cli/cmd/component.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cli/cmd/component.go b/cli/cmd/component.go index de237a0d5..c1c2e0b91 100644 --- a/cli/cmd/component.go +++ b/cli/cmd/component.go @@ -41,7 +41,6 @@ var ( // componentsCmd represents the components command componentsCmd = &cobra.Command{ Use: "component", - Hidden: true, Aliases: []string{"components"}, Short: "Manage components", Long: `Manage components to extend your experience with the Lacework platform`, From 934df905c7d4c475750ffe405b0c2f6ab8f26b49 Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Wed, 16 Oct 2024 16:33:05 -0400 Subject: [PATCH 2/5] chore: gitlint --- .github/workflows/commit-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml index 21612a925..5fec51c26 100644 --- a/.github/workflows/commit-lint.yml +++ b/.github/workflows/commit-lint.yml @@ -16,7 +16,7 @@ jobs: - name: Install gitlint shell: bash run: | - python -m pip install gitlint --break-system-packages + python -m pip install gitlint - name: Run gitlint shell: bash From 677ff842e2e202867eaf0bcd45be8c4d2dd32340 Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Wed, 16 Oct 2024 16:41:04 -0400 Subject: [PATCH 3/5] chore: test --- integration/test_resources/help/no-command-provided | 1 + 1 file changed, 1 insertion(+) diff --git a/integration/test_resources/help/no-command-provided b/integration/test_resources/help/no-command-provided index baac0dee7..88ea340bc 100644 --- a/integration/test_resources/help/no-command-provided +++ b/integration/test_resources/help/no-command-provided @@ -22,6 +22,7 @@ Available Commands: api Helper to call Lacework's API cloud-account Manage cloud accounts compliance Manage compliance reports + component Manage components configure Configure the Lacework CLI container-registry Manage container registries generate Generate code to onboard your account From 8a28654270bdca4de2cc9be2571cf61f5479df17 Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Wed, 16 Oct 2024 17:03:01 -0400 Subject: [PATCH 4/5] chore: fix test --- integration/test_resources/help/component | 9 +++++---- integration/test_resources/help/component_install | 3 ++- integration/test_resources/help/component_list | 4 ++-- integration/test_resources/help/component_uninstall | 2 +- integration/test_resources/help/component_update | 6 +++++- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/integration/test_resources/help/component b/integration/test_resources/help/component index 27e152a4c..99da3b0aa 100644 --- a/integration/test_resources/help/component +++ b/integration/test_resources/help/component @@ -7,10 +7,11 @@ Aliases: component, components Available Commands: - install install a new component - list list all components - uninstall uninstall an existing component - update update an existing component + install Install a new component + list List all components + show Show details about a component + uninstall Uninstall an existing component + update Update an existing component Flags: -h, --help help for component diff --git a/integration/test_resources/help/component_install b/integration/test_resources/help/component_install index 342c711ab..8435e22b2 100644 --- a/integration/test_resources/help/component_install +++ b/integration/test_resources/help/component_install @@ -4,7 +4,8 @@ Usage: lacework component install [flags] Flags: - -h, --help help for install + -h, --help help for install + --version string require a specific version to be installed (default is latest) Global Flags: -a, --account string account subdomain of URL (i.e. .lacework.net) diff --git a/integration/test_resources/help/component_list b/integration/test_resources/help/component_list index 5e6d1690c..4faded654 100644 --- a/integration/test_resources/help/component_list +++ b/integration/test_resources/help/component_list @@ -1,4 +1,4 @@ -List all components +List all available components and their current state Usage: lacework component list [flags] @@ -21,4 +21,4 @@ Global Flags: --noninteractive turn off interactive mode (disable spinners, prompts, etc.) --organization access organization level data sets (org admins only) -p, --profile string switch between profiles configured at ~/.lacework.toml - --subaccount string sub-account name inside your organization (org admins only) + --subaccount string sub-account name inside your organization (org admins only) \ No newline at end of file diff --git a/integration/test_resources/help/component_uninstall b/integration/test_resources/help/component_uninstall index e313db222..7983eeb01 100644 --- a/integration/test_resources/help/component_uninstall +++ b/integration/test_resources/help/component_uninstall @@ -21,4 +21,4 @@ Global Flags: --noninteractive turn off interactive mode (disable spinners, prompts, etc.) --organization access organization level data sets (org admins only) -p, --profile string switch between profiles configured at ~/.lacework.toml - --subaccount string sub-account name inside your organization (org admins only) + --subaccount string sub-account name inside your organization (org admins only) \ No newline at end of file diff --git a/integration/test_resources/help/component_update b/integration/test_resources/help/component_update index d4ef928c7..679751fc9 100644 --- a/integration/test_resources/help/component_update +++ b/integration/test_resources/help/component_update @@ -3,8 +3,12 @@ Update an existing component Usage: lacework component update [flags] +Aliases: + update, upgrade + Flags: - -h, --help help for update + -h, --help help for update + --version string update to a specific version (default is latest) Global Flags: -a, --account string account subdomain of URL (i.e. .lacework.net) From 3668574ea139f73bf62cf49345f48d9f3378355a Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Wed, 16 Oct 2024 17:12:17 -0400 Subject: [PATCH 5/5] chore: fix test --- .../test_resources/help/component_list | 2 +- .../test_resources/help/component_show | 21 +++++++++++++++++++ .../test_resources/help/component_uninstall | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 integration/test_resources/help/component_show diff --git a/integration/test_resources/help/component_list b/integration/test_resources/help/component_list index 4faded654..f0a84e3a4 100644 --- a/integration/test_resources/help/component_list +++ b/integration/test_resources/help/component_list @@ -21,4 +21,4 @@ Global Flags: --noninteractive turn off interactive mode (disable spinners, prompts, etc.) --organization access organization level data sets (org admins only) -p, --profile string switch between profiles configured at ~/.lacework.toml - --subaccount string sub-account name inside your organization (org admins only) \ No newline at end of file + --subaccount string sub-account name inside your organization (org admins only) diff --git a/integration/test_resources/help/component_show b/integration/test_resources/help/component_show new file mode 100644 index 000000000..f04b80730 --- /dev/null +++ b/integration/test_resources/help/component_show @@ -0,0 +1,21 @@ +Show details about a component + +Usage: + lacework component show [flags] + +Flags: + -h, --help help for show + +Global Flags: + -a, --account string account subdomain of URL (i.e. .lacework.net) + -k, --api_key string access key id + -s, --api_secret string secret access key + --api_token string access token (replaces the use of api_key and api_secret) + --debug turn on debug logging + --json switch commands output from human-readable to json format + --nocache turn off caching + --nocolor turn off colors + --noninteractive turn off interactive mode (disable spinners, prompts, etc.) + --organization access organization level data sets (org admins only) + -p, --profile string switch between profiles configured at ~/.lacework.toml + --subaccount string sub-account name inside your organization (org admins only) diff --git a/integration/test_resources/help/component_uninstall b/integration/test_resources/help/component_uninstall index 7983eeb01..e313db222 100644 --- a/integration/test_resources/help/component_uninstall +++ b/integration/test_resources/help/component_uninstall @@ -21,4 +21,4 @@ Global Flags: --noninteractive turn off interactive mode (disable spinners, prompts, etc.) --organization access organization level data sets (org admins only) -p, --profile string switch between profiles configured at ~/.lacework.toml - --subaccount string sub-account name inside your organization (org admins only) \ No newline at end of file + --subaccount string sub-account name inside your organization (org admins only)