Skip to content

Commit

Permalink
fixed generated fqdn (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
arontaubyte authored Aug 21, 2023
1 parent 2a68658 commit d1a81d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion cli/commands/resources/network/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func _select(ctx *cli.Context) error {

profile.NetworkType = common.DreamlandNetwork
profile.Network = universeName

default:
dreamClient, err := dreamland.Client(ctx.Context)
if err != nil {
Expand Down
10 changes: 8 additions & 2 deletions lib/domain/fqdn.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ func NewGeneratedFQDN(prefix string) (string, error) {
var fqdn string
selectedNetwork, _ := env.GetSelectedNetwork()
switch selectedNetwork {
case common.DreamlandNetwork, common.PythonTestNetwork:
case common.DreamlandNetwork:
universe, _ := env.GetCustomNetworkUrl()
fqdn = parseFqdn(fmt.Sprintf(".%s.localtau", universe))
case common.PythonTestNetwork:
fqdn = parseFqdn(DefaultGeneratedFqdnSuffix)
case common.RemoteNetwork:
customNetworkUrl, _ := env.GetCustomNetworkUrl()
Expand All @@ -86,7 +89,10 @@ func NewGeneratedFQDN(prefix string) (string, error) {
func IsAGeneratedFQDN(fqdn string) (bool, error) {
selectedNetwork, _ := env.GetSelectedNetwork()
switch selectedNetwork {
case common.DreamlandNetwork, common.PythonTestNetwork:
case common.DreamlandNetwork:
universe, _ := env.GetCustomNetworkUrl()
return strings.HasSuffix(fqdn, fmt.Sprintf(".%s.localtau", universe)), nil
case common.PythonTestNetwork:
return strings.HasSuffix(fqdn, DefaultGeneratedFqdnSuffix), nil
case common.RemoteNetwork:
customNetworkUrl, _ := env.GetCustomNetworkUrl()
Expand Down

0 comments on commit d1a81d4

Please sign in to comment.