Skip to content

Commit

Permalink
remove the backplane url checks
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeng committed Jan 3, 2024
1 parent f3b8df7 commit f193949
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
6 changes: 1 addition & 5 deletions cmd/ocm-backplane/cloud/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package cloud

import (
"encoding/json"
"errors"
"fmt"
"os"
"strconv"

ocmsdk "github.com/openshift-online/ocm-cli/pkg/ocm"

"github.com/openshift/backplane-cli/pkg/ocm"

"github.com/pkg/browser"
Expand Down Expand Up @@ -127,10 +127,6 @@ func runConsole(cmd *cobra.Command, argv []string) (err error) {
if credentialArgs.backplaneURL != "" { // Overwrite if parameter is set
backplaneConfiguration.URL = credentialArgs.backplaneURL
}

if backplaneConfiguration.URL == "" {
return errors.New("empty backplane url - check your backplane-cli configuration")
}
logger.Infof("Using backplane URL: %s\n", backplaneConfiguration.URL)

// Initialize OCM connection
Expand Down
12 changes: 4 additions & 8 deletions cmd/ocm-backplane/cloud/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ package cloud

import (
"encoding/json"
"errors"
"fmt"

ocmsdk "github.com/openshift-online/ocm-cli/pkg/ocm"
logger "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"sigs.k8s.io/yaml"

"github.com/openshift/backplane-cli/pkg/cli/config"
bpCredentials "github.com/openshift/backplane-cli/pkg/credentials"
"github.com/openshift/backplane-cli/pkg/ocm"
"github.com/openshift/backplane-cli/pkg/utils"
logger "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"sigs.k8s.io/yaml"
)

var GetBackplaneClusterFromConfig = utils.DefaultClusterUtils.GetBackplaneClusterFromConfig
Expand Down Expand Up @@ -95,10 +95,6 @@ func runCredentials(cmd *cobra.Command, argv []string) error {
if credentialArgs.backplaneURL != "" { // Overwrite if parameter is set
backplaneConfiguration.URL = credentialArgs.backplaneURL
}

if backplaneConfiguration.URL == "" {
return errors.New("empty backplane url - check your backplane-cli configuration")
}
logger.Infof("Using backplane URL: %s\n", backplaneConfiguration.URL)

// Initialize OCM connection
Expand Down

0 comments on commit f193949

Please sign in to comment.