Skip to content

Commit

Permalink
OCM-12101 | fix: Adding log outputs for empty values
Browse files Browse the repository at this point in the history
  • Loading branch information
den-rgb authored and openshift-cherrypick-robot committed Oct 25, 2024
1 parent 4ebcf5a commit f886af8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/create/network/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,18 @@ func NetworkRunner(userOptions *opts.NetworkUserOptions) rosa.CommandRunner {
}

if parsedParams["Name"] == "" {
r.Logger.Debugf("Name not provided, using default name %s", r.Creator.AccountID)
r.Reporter.Infof("Name not provided, using default name %s", r.Creator.AccountID)
parsedParams["Name"] = "rosa-network-stack-" + r.Creator.AccountID
}
if parsedParams["Region"] == "" {
r.Logger.Debugf("Region not provided, using default region %s", r.AWSClient.GetRegion())
r.Reporter.Infof("Region not provided, using default region %s", r.AWSClient.GetRegion())
parsedParams["Region"] = r.AWSClient.GetRegion()
}

// Extract the first non-`--param` argument to use as the template command
if len(argv) == 0 {
r.Reporter.Infof("Template command not provided, using default template %s", templateCommand)
}
for _, arg := range argv {
if !strings.HasPrefix(arg, "--param") {
templateCommand = arg
Expand Down

0 comments on commit f886af8

Please sign in to comment.