mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-23 17:03:17 +08:00
update node expiration during migration (#2532)
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
@@ -201,7 +200,7 @@ func convertLegacyNode(legacy models.LegacyNode, hostID uuid.UUID) models.Node {
|
|||||||
node.DNSOn = models.ParseBool(legacy.DNSOn)
|
node.DNSOn = models.ParseBool(legacy.DNSOn)
|
||||||
node.PersistentKeepalive = time.Duration(int64(time.Second) * int64(legacy.PersistentKeepalive))
|
node.PersistentKeepalive = time.Duration(int64(time.Second) * int64(legacy.PersistentKeepalive))
|
||||||
node.LastModified = time.Now()
|
node.LastModified = time.Now()
|
||||||
node.ExpirationDateTime, _ = time.Parse(strconv.Itoa(int(legacy.ExpirationDateTime)), "0")
|
node.ExpirationDateTime = time.Unix(legacy.ExpirationDateTime, 0)
|
||||||
node.EgressGatewayNatEnabled = models.ParseBool(legacy.EgressGatewayNatEnabled)
|
node.EgressGatewayNatEnabled = models.ParseBool(legacy.EgressGatewayNatEnabled)
|
||||||
node.EgressGatewayRequest = legacy.EgressGatewayRequest
|
node.EgressGatewayRequest = legacy.EgressGatewayRequest
|
||||||
node.IngressGatewayRange = legacy.IngressGatewayRange
|
node.IngressGatewayRange = legacy.IngressGatewayRange
|
||||||
|
Reference in New Issue
Block a user