mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 09:22:42 +08:00
rando logs
This commit is contained in:
@@ -3,7 +3,7 @@ package controller
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"log"
|
||||
"github.com/gravitl/netmaker/functions"
|
||||
nodepb "github.com/gravitl/netmaker/grpc"
|
||||
"github.com/gravitl/netmaker/models"
|
||||
@@ -170,6 +170,7 @@ func (s *NodeServiceServer) CheckIn(ctx context.Context, req *nodepb.CheckInReq)
|
||||
PersistentKeepalive: data.GetKeepalive(),
|
||||
PublicKey: data.GetPublickey(),
|
||||
UDPHolePunch: data.GetUdpholepunch(),
|
||||
SaveConfig: data.GetSaveconfig(),
|
||||
}
|
||||
|
||||
checkinresponse, err := NodeCheckIn(node, node.Network)
|
||||
@@ -201,6 +202,7 @@ func (s *NodeServiceServer) CheckIn(ctx context.Context, req *nodepb.CheckInReq)
|
||||
func (s *NodeServiceServer) UpdateNode(ctx context.Context, req *nodepb.UpdateNodeReq) (*nodepb.UpdateNodeRes, error) {
|
||||
// Get the node data from the request
|
||||
data := req.GetNode()
|
||||
log.Println("DATA:",data)
|
||||
// Now we have to convert this into a NodeItem type to convert into BSON
|
||||
newnode := models.Node{
|
||||
// ID: primitive.NilObjectID,
|
||||
@@ -228,11 +230,7 @@ func (s *NodeServiceServer) UpdateNode(ctx context.Context, req *nodepb.UpdateNo
|
||||
networkName := newnode.Network
|
||||
network, _ := functions.GetParentNetwork(networkName)
|
||||
|
||||
err := newnode.Validate(true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
log.Println("NODE SAVECONFIG:",newnode.SaveConfig)
|
||||
node, err := functions.GetNodeByMacAddress(networkName, macaddress)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(
|
||||
|
Reference in New Issue
Block a user