Browse Source

Merge branch 'feature_v0.4_clients' of https://github.com/gravitl/netmaker into feature_v0.4_clients

root 4 years ago
parent
commit
63c2ccd864
2 changed files with 3 additions and 2 deletions
  1. 1 0
      controllers/nodeGrpcController.go
  2. 2 2
      models/node.go

+ 1 - 0
controllers/nodeGrpcController.go

@@ -61,6 +61,7 @@ func (s *NodeServiceServer) ReadNode(ctx context.Context, req *nodepb.ReadNodeRe
 			Checkininterval: node.CheckInInterval,
 			Checkininterval: node.CheckInInterval,
 			Dnsoff:          !servercfg.IsDNSMode(),
 			Dnsoff:          !servercfg.IsDNSMode(),
 			Ispending:       node.IsPending,
 			Ispending:       node.IsPending,
+			Isingressgateway:       node.IsIngressGateway,
 			Publickey:       node.PublicKey,
 			Publickey:       node.PublicKey,
 			Listenport:      node.ListenPort,
 			Listenport:      node.ListenPort,
 			Keepalive:       node.PersistentKeepalive,
 			Keepalive:       node.PersistentKeepalive,

+ 2 - 2
models/node.go

@@ -22,7 +22,7 @@ type Node struct {
 	Address             string             `json:"address" bson:"address" validate:"omitempty,ipv4"`
 	Address             string             `json:"address" bson:"address" validate:"omitempty,ipv4"`
 	Address6            string             `json:"address6" bson:"address6" validate:"omitempty,ipv6"`
 	Address6            string             `json:"address6" bson:"address6" validate:"omitempty,ipv6"`
 	LocalAddress        string             `json:"localaddress" bson:"localaddress" validate:"omitempty,ip"`
 	LocalAddress        string             `json:"localaddress" bson:"localaddress" validate:"omitempty,ip"`
-	Name                string             `json:"name" bson:"name" validate:"omitempty,alphanum,max=12"`
+	Name                string             `json:"name" bson:"name" validate:"omitempty,max=12"`
 	ListenPort          int32              `json:"listenport" bson:"listenport" validate:"omitempty,numeric,min=1024,max=65535"`
 	ListenPort          int32              `json:"listenport" bson:"listenport" validate:"omitempty,numeric,min=1024,max=65535"`
 	PublicKey           string             `json:"publickey" bson:"publickey" validate:"required,base64"`
 	PublicKey           string             `json:"publickey" bson:"publickey" validate:"required,base64"`
 	Endpoint            string             `json:"endpoint" bson:"endpoint" validate:"required,ip"`
 	Endpoint            string             `json:"endpoint" bson:"endpoint" validate:"required,ip"`
@@ -55,7 +55,7 @@ type NodeUpdate struct {
 	Address             string             `json:"address" bson:"address" validate:"omitempty,ip"`
 	Address             string             `json:"address" bson:"address" validate:"omitempty,ip"`
 	Address6            string             `json:"address6" bson:"address6" validate:"omitempty,ipv6"`
 	Address6            string             `json:"address6" bson:"address6" validate:"omitempty,ipv6"`
 	LocalAddress        string             `json:"localaddress" bson:"localaddress" validate:"omitempty,ip"`
 	LocalAddress        string             `json:"localaddress" bson:"localaddress" validate:"omitempty,ip"`
-	Name                string             `json:"name" bson:"name" validate:"omitempty,alphanum,max=12"`
+	Name                string             `json:"name" bson:"name" validate:"omitempty,max=12"`
 	ListenPort          int32              `json:"listenport" bson:"listenport" validate:"omitempty,numeric,min=1024,max=65535"`
 	ListenPort          int32              `json:"listenport" bson:"listenport" validate:"omitempty,numeric,min=1024,max=65535"`
 	PublicKey           string             `json:"publickey" bson:"publickey" validate:"omitempty,base64"`
 	PublicKey           string             `json:"publickey" bson:"publickey" validate:"omitempty,base64"`
 	Endpoint            string             `json:"endpoint" bson:"endpoint" validate:"omitempty,ip"`
 	Endpoint            string             `json:"endpoint" bson:"endpoint" validate:"omitempty,ip"`