Skip to content
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

fixed generated fqdn for dreamland to be universe.localtau #36

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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