Refactor machine.go, and move functionality to routes.go + unit tests
Port routes tests to new model Mark as primary the first instance of subnet + tests In preparation for subnet failover, mark the initial occurrence of a subnet as the primary one.
This commit is contained in:
parent
ac8bff716d
commit
b62acff2e3
6 changed files with 275 additions and 98 deletions
|
@ -374,7 +374,7 @@ func (api headscaleV1APIServer) GetMachineRoute(
|
|||
}
|
||||
|
||||
return &v1.GetMachineRouteResponse{
|
||||
Routes: machine.RoutesToProto(),
|
||||
Routes: api.h.RoutesToProto(machine),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -393,7 +393,7 @@ func (api headscaleV1APIServer) EnableMachineRoutes(
|
|||
}
|
||||
|
||||
return &v1.EnableMachineRoutesResponse{
|
||||
Routes: machine.RoutesToProto(),
|
||||
Routes: api.h.RoutesToProto(machine),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue