Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
support to view deployment change report
Browse files Browse the repository at this point in the history
  • Loading branch information
srinandan committed Nov 28, 2021
1 parent e1e5544 commit 62fb6a1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/apis/listdeploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ var ListDepCmd = &cobra.Command{
RunE: func(cmd *cobra.Command, args []string) (err error) {
if apiclient.GetApigeeEnv() != "" {
if revision != -1 {
_, err = apis.ListProxyRevisionDeployments(name, revision)
if !report {
_, err = apis.ListProxyRevisionDeployments(name, revision)
} else {
_, err = apis.GenerateDeployChangeReport(name, revision, false)
}
} else {
_, err = apis.ListEnvDeployments()
}
Expand All @@ -55,11 +59,15 @@ var ListDepCmd = &cobra.Command{
},
}

var report bool

func init() {
ListDepCmd.Flags().StringVarP(&name, "name", "n",
"", "API proxy name")
ListDepCmd.Flags().StringVarP(&env, "env", "e",
"", "Apigee environment name")
ListDepCmd.Flags().IntVarP(&revision, "rev", "r",
-1, "API Proxy revision")
ListDepCmd.Flags().BoolVarP(&report, "report", "",
false, "Generate Deploy Change Report; Default is false")
}

0 comments on commit 62fb6a1

Please sign in to comment.