-
Notifications
You must be signed in to change notification settings - Fork 26
Support for creating multichannel licenses #398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5d3512e
to
265c77c
Compare
@@ -62,28 +67,49 @@ func (r *runners) updateCustomer(cmd *cobra.Command, _ []string) (err error) { | |||
r.args.customerUpdateType = "prod" | |||
} | |||
|
|||
channelID := "" | |||
if r.args.customerUpdateChannel != "" { | |||
channels := []kotsclient.CustomerChannel{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should validate somewhere above that if multiple channels are specified, then customerCreateDefaultChannel
must have a value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going for:
You can specify which is default, but if you don't specify, the first is the default. I included that in the help text.
cli/cmd/customer_update.go
Outdated
ID: channel.ID, | ||
} | ||
|
||
if r.args.customerCreateDefaultChannel == requestedChannel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
customerCreateDefaultChannel
can be an empty string. This should be allowed only when single channel is specified, which should always have IsDefault
set.
nm, I see this below
Hopefully last commit. Noticed a pair of bugs (using r.args.customerCreateDefaultChannel in the update subcommand, and missing that we never actually marked having found the default channel). While i was at it, also started throwing an error if the user supplies a default channel thats not actually in supplied channel set. Demo - bogus default chan:
Perfect scenario:
No default channel arg provided:
|
Support creating multi-channel licenses