From 62fd0fa2579605f020a497e225d2e938642d67cd Mon Sep 17 00:00:00 2001 From: David Bloss Date: Wed, 9 Oct 2024 13:22:54 -0500 Subject: [PATCH] added new reactivate integration command (#336) * added new reactivate integration command * update submodule hash * better message for integration reactivate --- .../unreleased/Feature-20241008-114223.yaml | 3 +++ src/cmd/integration.go | 17 +++++++++++++++++ src/submodules/opslevel-go | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Feature-20241008-114223.yaml diff --git a/.changes/unreleased/Feature-20241008-114223.yaml b/.changes/unreleased/Feature-20241008-114223.yaml new file mode 100644 index 00000000..7a96c5aa --- /dev/null +++ b/.changes/unreleased/Feature-20241008-114223.yaml @@ -0,0 +1,3 @@ +kind: Feature +body: added new reactivate integration command +time: 2024-10-08T11:42:23.020571-05:00 diff --git a/src/cmd/integration.go b/src/cmd/integration.go index 91d1fd06..ce04bcda 100644 --- a/src/cmd/integration.go +++ b/src/cmd/integration.go @@ -231,9 +231,26 @@ EOF }, } +var reactivateIntegrationCmd = &cobra.Command{ + Use: "reactivate ID", + Short: "Reactivate an integration", + Long: `Reactivate an integration that was invalidated or deactivated`, + Example: `opslevel update integration reactivate Z2lkOi8vb123456789`, + Args: cobra.ExactArgs(1), + ArgAliases: []string{"ID"}, + Run: func(cmd *cobra.Command, args []string) { + integration, err := getClientGQL().IntegrationReactivate(args[0]) + cobra.CheckErr(err) + + fmt.Printf("reactivated integration '%s' with id '%s'", integration.Name, integration.Id) + }, +} + func init() { createCmd.AddCommand(createIntegrationCmd) getCmd.AddCommand(getIntegrationCmd) listCmd.AddCommand(listIntegrationCmd) updateCmd.AddCommand(updateIntegrationCmd) + + updateIntegrationCmd.AddCommand(reactivateIntegrationCmd) } diff --git a/src/submodules/opslevel-go b/src/submodules/opslevel-go index 91ff8258..be6cd2f2 160000 --- a/src/submodules/opslevel-go +++ b/src/submodules/opslevel-go @@ -1 +1 @@ -Subproject commit 91ff8258b1dda1ea082ba62ea66eb22d561bda66 +Subproject commit be6cd2f28a1c5551fac0017370264b4a5d131a92