ipn/ipnstate: add TailnetName to status
RELNOTE=tailscale status --json | jq .TailnetName Fixes tailscale/corp#3665 Change-Id: I85de027ba2781eb31ee1e0c5ab913b0dfa5b4c86 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>pull/3815/head
parent
ae525a7394
commit
857cd6c0d7
|
@ -381,6 +381,7 @@ func (b *LocalBackend) updateStatus(sb *ipnstate.StatusBuilder, extraLocked func
|
||||||
if b.netMap != nil {
|
if b.netMap != nil {
|
||||||
s.MagicDNSSuffix = b.netMap.MagicDNSSuffix()
|
s.MagicDNSSuffix = b.netMap.MagicDNSSuffix()
|
||||||
s.CertDomains = append([]string(nil), b.netMap.DNS.CertDomains...)
|
s.CertDomains = append([]string(nil), b.netMap.DNS.CertDomains...)
|
||||||
|
s.TailnetName = b.netMap.Domain
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
sb.MutateSelfStatus(func(ss *ipnstate.PeerStatus) {
|
sb.MutateSelfStatus(func(ss *ipnstate.PeerStatus) {
|
||||||
|
|
|
@ -33,6 +33,10 @@ type Status struct {
|
||||||
// "Starting", "Running".
|
// "Starting", "Running".
|
||||||
BackendState string
|
BackendState string
|
||||||
|
|
||||||
|
// TailnetName is the name of the network that's currently in
|
||||||
|
// use.
|
||||||
|
TailnetName string
|
||||||
|
|
||||||
AuthURL string // current URL provided by control to authorize client
|
AuthURL string // current URL provided by control to authorize client
|
||||||
TailscaleIPs []netaddr.IP // Tailscale IP(s) assigned to this node
|
TailscaleIPs []netaddr.IP // Tailscale IP(s) assigned to this node
|
||||||
Self *PeerStatus
|
Self *PeerStatus
|
||||||
|
|
|
@ -63,6 +63,8 @@ type NetworkMap struct {
|
||||||
// ACLs
|
// ACLs
|
||||||
|
|
||||||
User tailcfg.UserID
|
User tailcfg.UserID
|
||||||
|
|
||||||
|
// Domain is the current Tailnet name.
|
||||||
Domain string
|
Domain string
|
||||||
|
|
||||||
UserProfiles map[tailcfg.UserID]tailcfg.UserProfile
|
UserProfiles map[tailcfg.UserID]tailcfg.UserProfile
|
||||||
|
|
Loading…
Reference in New Issue