Skip to content

Commit

Permalink
added new reactivate integration command (#336)
Browse files Browse the repository at this point in the history
* added new reactivate integration command

* update submodule hash

* better message for integration reactivate
  • Loading branch information
davidbloss authored Oct 9, 2024
1 parent 5ca824f commit 62fd0fa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changes/unreleased/Feature-20241008-114223.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Feature
body: added new reactivate integration command
time: 2024-10-08T11:42:23.020571-05:00
17 changes: 17 additions & 0 deletions src/cmd/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
2 changes: 1 addition & 1 deletion src/submodules/opslevel-go

0 comments on commit 62fd0fa

Please sign in to comment.