Skip to content

Commit

Permalink
Add user to the optional args. Also, added type of data in request fo…
Browse files Browse the repository at this point in the history
…r show. (#1201)

* EDGECLOUD-4046 alertreceiver mcctl help should show the user argument
   - added optional user argument
* EDGECLOUD-4052 alertreceiver show does not work with app/cluster org
   - since there was no ReqData argument were not mapped correctly in a show command.
  • Loading branch information
levshvarts authored Dec 2, 2020
1 parent 818e181 commit 546362f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mc/mcctl/ormctl/alert_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func GetAlertReceiverCommand() *cobra.Command {
AliasArgs: strings.Join(AlertReceiverAliasArgs, " "),
Comments: AlertReceiverArgsComments,
OptionalArgs: strings.Join(AlertReceiverOptionalArgs, " ") + " " + strings.Join(AlertReceiverRequiredArgs, " "),
ReqData: &ormapi.AlertReceiver{},
ReplyData: &[]ormapi.AlertReceiver{},
Run: runRest("/auth/alertreceiver/show"),
}}
Expand All @@ -59,6 +60,7 @@ var AlertReceiverRequiredArgs = []string{

var AlertReceiverOptionalArgs = []string{
"region",
"user",
"email",
"slack-channel",
"slack-api-url",
Expand All @@ -75,6 +77,7 @@ var AlertReceiverOptionalArgs = []string{

var AlertReceiverArgsComments = map[string]string{
"region": "Region where alert originated",
"user": "User name, if not the same as the logged in user",
"name": "Unique name of this receiver",
"type": "Receiver type - email, or slack",
"severity": "Alert severity level - one of " + cloudcommon.GetValidAlertSeverityString(),
Expand Down

0 comments on commit 546362f

Please sign in to comment.