Skip to content

Commit

Permalink
chore: remove interfaces and routes APIs
Browse files Browse the repository at this point in the history
Fixes #4279

These APIs were deprecated in 0.13, now it's time to drop them for 0.14.

They were not used anywhere in Talos, so no changes on Talos side.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Oct 27, 2021
1 parent d798635 commit c97becd
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 3,257 deletions.
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ COPY ./api/machine/machine.proto /api/machine/machine.proto
RUN protoc -I/api -I/api/vendor/ --go_out=paths=source_relative:/api --go-grpc_out=paths=source_relative:/api --go-vtproto_out=paths=source_relative:/api --go-vtproto_opt=features=marshal+unmarshal+size machine/machine.proto
COPY ./api/time/time.proto /api/time/time.proto
RUN protoc -I/api -I/api/vendor/ --go_out=paths=source_relative:/api --go-grpc_out=paths=source_relative:/api --go-vtproto_out=paths=source_relative:/api --go-vtproto_opt=features=marshal+unmarshal+size time/time.proto
COPY ./api/network/network.proto /api/network/network.proto
RUN protoc -I/api -I/api/vendor/ --go_out=paths=source_relative:/api --go-grpc_out=paths=source_relative:/api --go-vtproto_out=paths=source_relative:/api --go-vtproto_opt=features=marshal+unmarshal+size network/network.proto
COPY ./api/cluster/cluster.proto /api/cluster/cluster.proto
RUN protoc -I/api -I/api/vendor/ --go_out=paths=source_relative:/api --go-grpc_out=paths=source_relative:/api --go-vtproto_out=paths=source_relative:/api --go-vtproto_opt=features=marshal+unmarshal+size cluster/cluster.proto
COPY ./api/resource/resource.proto /api/resource/resource.proto
Expand All @@ -184,7 +182,6 @@ COPY --from=generate-build /api/common/*.pb.go /pkg/machinery/api/common/
COPY --from=generate-build /api/security/*.pb.go /pkg/machinery/api/security/
COPY --from=generate-build /api/machine/*.pb.go /pkg/machinery/api/machine/
COPY --from=generate-build /api/time/*.pb.go /pkg/machinery/api/time/
COPY --from=generate-build /api/network/*.pb.go /pkg/machinery/api/network/
COPY --from=generate-build /api/cluster/*.pb.go /pkg/machinery/api/cluster/
COPY --from=generate-build /api/storage/*.pb.go /pkg/machinery/api/storage/
COPY --from=generate-build /api/resource/*.pb.go /pkg/machinery/api/resource/
Expand Down Expand Up @@ -673,7 +670,6 @@ RUN protoc \
-I/protos/common \
-I/protos/inspect \
-I/protos/machine \
-I/protos/network \
-I/protos/resource \
-I/protos/security \
-I/protos/storage \
Expand All @@ -684,7 +680,6 @@ RUN protoc \
/protos/common/*.proto \
/protos/inspect/*.proto \
/protos/machine/*.proto \
/protos/network/*.proto \
/protos/resource/*.proto \
/protos/security/*.proto \
/protos/storage/*.proto \
Expand Down
106 changes: 0 additions & 106 deletions api/network/network.proto

This file was deleted.

3 changes: 0 additions & 3 deletions hack/protoc-lint/lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/talos-systems/talos/pkg/machinery/api/common"
"github.com/talos-systems/talos/pkg/machinery/api/inspect"
"github.com/talos-systems/talos/pkg/machinery/api/machine"
"github.com/talos-systems/talos/pkg/machinery/api/network"
"github.com/talos-systems/talos/pkg/machinery/api/resource"
"github.com/talos-systems/talos/pkg/machinery/api/security"
"github.com/talos-systems/talos/pkg/machinery/api/storage"
Expand All @@ -35,7 +34,6 @@ func TestProto(t *testing.T) {
cluster.File_cluster_cluster_proto.Services(),
inspect.File_inspect_inspect_proto.Services(),
machine.File_machine_machine_proto.Services(),
network.File_network_network_proto.Services(),
resource.File_resource_resource_proto.Services(),
security.File_security_security_proto.Services(),
storage.File_storage_storage_proto.Services(),
Expand All @@ -57,7 +55,6 @@ func TestProto(t *testing.T) {
cluster.ClusterService_ServiceDesc,
inspect.InspectService_ServiceDesc,
machine.MachineService_ServiceDesc,
network.NetworkService_ServiceDesc,
resource.ResourceService_ServiceDesc,
security.SecurityService_ServiceDesc,
storage.StorageService_ServiceDesc,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import (
"github.com/talos-systems/talos/internal/app/machined/pkg/runtime/v1alpha1/bootloader/adv"
"github.com/talos-systems/talos/internal/app/machined/pkg/runtime/v1alpha1/bootloader/grub"
"github.com/talos-systems/talos/internal/app/machined/pkg/system"
networkserver "github.com/talos-systems/talos/internal/app/networkd/pkg/server"
"github.com/talos-systems/talos/internal/app/resources"
storaged "github.com/talos-systems/talos/internal/app/storaged"
"github.com/talos-systems/talos/internal/pkg/configuration"
Expand All @@ -67,7 +66,6 @@ import (
"github.com/talos-systems/talos/pkg/machinery/api/common"
"github.com/talos-systems/talos/pkg/machinery/api/inspect"
"github.com/talos-systems/talos/pkg/machinery/api/machine"
"github.com/talos-systems/talos/pkg/machinery/api/network"
"github.com/talos-systems/talos/pkg/machinery/api/resource"
"github.com/talos-systems/talos/pkg/machinery/api/storage"
timeapi "github.com/talos-systems/talos/pkg/machinery/api/time"
Expand Down Expand Up @@ -121,7 +119,6 @@ func (s *Server) Register(obj *grpc.Server) {
inspect.RegisterInspectServiceServer(obj, &InspectServer{server: s})
storage.RegisterStorageServiceServer(obj, &storaged.Server{})
timeapi.RegisterTimeServiceServer(obj, &TimeServer{ConfigProvider: s.Controller.Runtime()})
network.RegisterNetworkServiceServer(obj, &networkserver.NetworkServer{})
}

// ApplyConfiguration implements machine.MachineService.
Expand Down
3 changes: 0 additions & 3 deletions internal/app/machined/pkg/system/services/machined.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ var rules = map[string]role.Set{
"/machine.MachineService/Upgrade": role.MakeSet(role.Admin),
"/machine.MachineService/Version": role.MakeSet(role.Admin, role.Reader),

"/network.NetworkService/Interfaces": role.MakeSet(role.Admin, role.Reader),
"/network.NetworkService/Routes": role.MakeSet(role.Admin, role.Reader),

// per-type authorization is handled by the service itself
"/resource.ResourceService/Get": role.MakeSet(role.Admin, role.Reader),
"/resource.ResourceService/List": role.MakeSet(role.Admin, role.Reader),
Expand Down
2 changes: 0 additions & 2 deletions internal/app/machined/pkg/system/services/machined_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/talos-systems/talos/pkg/machinery/api/cluster"
"github.com/talos-systems/talos/pkg/machinery/api/inspect"
"github.com/talos-systems/talos/pkg/machinery/api/machine"
"github.com/talos-systems/talos/pkg/machinery/api/network"
"github.com/talos-systems/talos/pkg/machinery/api/resource"
"github.com/talos-systems/talos/pkg/machinery/api/storage"
"github.com/talos-systems/talos/pkg/machinery/api/time"
Expand All @@ -28,7 +27,6 @@ func collectMethods(t *testing.T) map[string]struct{} {
cluster.ClusterService_ServiceDesc,
inspect.InspectService_ServiceDesc,
machine.MachineService_ServiceDesc,
network.NetworkService_ServiceDesc,
resource.ResourceService_ServiceDesc,
// security.SecurityService_ServiceDesc, - not in machined
storage.StorageService_ServiceDesc,
Expand Down
3 changes: 0 additions & 3 deletions internal/app/maintenance/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ import (
"google.golang.org/grpc/status"

"github.com/talos-systems/talos/internal/app/machined/pkg/runtime"
networkserver "github.com/talos-systems/talos/internal/app/networkd/pkg/server"
"github.com/talos-systems/talos/internal/app/resources"
storaged "github.com/talos-systems/talos/internal/app/storaged"
"github.com/talos-systems/talos/internal/pkg/configuration"
"github.com/talos-systems/talos/pkg/machinery/api/machine"
"github.com/talos-systems/talos/pkg/machinery/api/network"
"github.com/talos-systems/talos/pkg/machinery/api/resource"
"github.com/talos-systems/talos/pkg/machinery/api/storage"
"github.com/talos-systems/talos/pkg/machinery/config/configloader"
Expand Down Expand Up @@ -51,7 +49,6 @@ func (s *Server) Register(obj *grpc.Server) {

storage.RegisterStorageServiceServer(obj, &storaged.Server{})
machine.RegisterMachineServiceServer(obj, s)
network.RegisterNetworkServiceServer(obj, &networkserver.NetworkServer{})
resource.RegisterResourceServiceServer(obj, &resources.Server{Resources: s.runtime.State().V1Alpha2().Resources()})
}

Expand Down
145 changes: 0 additions & 145 deletions internal/app/networkd/pkg/server/server.go

This file was deleted.

0 comments on commit c97becd

Please sign in to comment.