Skip to content

Commit

Permalink
fixed setting isGcpMarketplaceSubscriptionType for non interactive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoveiga committed Oct 6, 2023
1 parent d9b1346 commit 46ef494
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/ocm/create/cluster/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ func preRun(cmd *cobra.Command, argv []string) error {
// If marketplace-gcp subscription type is used, provider can only be GCP
gcpBillingModel, _ := billing.GetBillingModel(connection, billing.MarketplaceGcpSubscriptionType)
gcpSubscriptionTypeTemplate := subscriptionTypeOption(gcpBillingModel.ID(), gcpBillingModel.Description())
isGcpMarketplaceSubscriptionType := args.subscriptionType == gcpSubscriptionTypeTemplate.Value
isGcpMarketplace := parseSubscriptionType(args.subscriptionType) == parseSubscriptionType(gcpSubscriptionTypeTemplate.Value)

Check failure on line 513 in cmd/ocm/create/cluster/cmd.go

View workflow job for this annotation

GitHub Actions / Lint

line is 125 characters (lll)

if isGcpMarketplaceSubscriptionType {
if isGcpMarketplace {
fmt.Println("setting provider to", c.ProviderGCP)
args.provider = c.ProviderGCP
} else {
Expand All @@ -529,7 +529,7 @@ func preRun(cmd *cobra.Command, argv []string) error {
}

// If marketplace-gcp subscription type is used, ccs should by default be true
if isGcpMarketplaceSubscriptionType {
if isGcpMarketplace {
fmt.Println("setting ccs to 'true'")
args.ccs.Enabled = true
}
Expand All @@ -553,8 +553,8 @@ func preRun(cmd *cobra.Command, argv []string) error {
}

var gcpMarketplaceEnabled string
if isGcpMarketplaceSubscriptionType {
gcpMarketplaceEnabled = strconv.FormatBool(isGcpMarketplaceSubscriptionType)
if isGcpMarketplace {
gcpMarketplaceEnabled = strconv.FormatBool(isGcpMarketplace)
}
versions, defaultVersion, err := getVersionOptionsWithDefault(connection, args.channelGroup,
gcpMarketplaceEnabled)
Expand Down

0 comments on commit 46ef494

Please sign in to comment.