Skip to content

Commit 62fd0fa

Browse files
authored
added new reactivate integration command (#336)
* added new reactivate integration command * update submodule hash * better message for integration reactivate
1 parent 5ca824f commit 62fd0fa

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Feature
2+
body: added new reactivate integration command
3+
time: 2024-10-08T11:42:23.020571-05:00

src/cmd/integration.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,26 @@ EOF
231231
},
232232
}
233233

234+
var reactivateIntegrationCmd = &cobra.Command{
235+
Use: "reactivate ID",
236+
Short: "Reactivate an integration",
237+
Long: `Reactivate an integration that was invalidated or deactivated`,
238+
Example: `opslevel update integration reactivate Z2lkOi8vb123456789`,
239+
Args: cobra.ExactArgs(1),
240+
ArgAliases: []string{"ID"},
241+
Run: func(cmd *cobra.Command, args []string) {
242+
integration, err := getClientGQL().IntegrationReactivate(args[0])
243+
cobra.CheckErr(err)
244+
245+
fmt.Printf("reactivated integration '%s' with id '%s'", integration.Name, integration.Id)
246+
},
247+
}
248+
234249
func init() {
235250
createCmd.AddCommand(createIntegrationCmd)
236251
getCmd.AddCommand(getIntegrationCmd)
237252
listCmd.AddCommand(listIntegrationCmd)
238253
updateCmd.AddCommand(updateIntegrationCmd)
254+
255+
updateIntegrationCmd.AddCommand(reactivateIntegrationCmd)
239256
}

0 commit comments

Comments
 (0)