From 9e9988df291ed76444381f2de811352d9fb23bca Mon Sep 17 00:00:00 2001 From: Tim Zhang Date: Fri, 23 Oct 2020 15:01:56 +0800 Subject: [PATCH] agent/protocols: Move agent.proto out of the mock folder of agent Because the repos have been merged and the agent repo will be removed in the future, we do not need mock the file structure any more. Signed-off-by: Tim Zhang --- src/agent/protocols/build.rs | 2 +- src/agent/protocols/hack/update-generated-proto.sh | 6 +++--- src/agent/protocols/protos/agent.proto | 4 ++-- .../kata-containers/agent/pkg/types => }/types.proto | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename src/agent/protocols/protos/{github.com/kata-containers/agent/pkg/types => }/types.proto (97%) diff --git a/src/agent/protocols/build.rs b/src/agent/protocols/build.rs index c60aa9ba7..fcc443447 100644 --- a/src/agent/protocols/build.rs +++ b/src/agent/protocols/build.rs @@ -8,7 +8,7 @@ use std::io::{Read, Write}; fn main() { let protos = vec![ - "protos/github.com/kata-containers/agent/pkg/types/types.proto", + "protos/types.proto", "protos/agent.proto", "protos/health.proto", "protos/google/protobuf/empty.proto", diff --git a/src/agent/protocols/hack/update-generated-proto.sh b/src/agent/protocols/hack/update-generated-proto.sh index ad8aeb257..c8118e80c 100755 --- a/src/agent/protocols/hack/update-generated-proto.sh +++ b/src/agent/protocols/hack/update-generated-proto.sh @@ -1,7 +1,7 @@ #!/bin/bash # // -# // Copyright (c) 2020 Ant Financial +# // Copyright (c) 2020 Ant Group # // # // SPDX-License-Identifier: Apache-2.0 # // @@ -51,7 +51,7 @@ generate_go_sources() { --gogottrpc_out=plugins=ttrpc+fieldpath,\ import_path=github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/agent/protocols/grpc,\ \ -Mgithub.com/kata-containers/kata-containers/src/agent/protocols/protos/github.com/kata-containers/agent/pkg/types/types.proto=github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/agent/protocols,\ +Mgithub.com/kata-containers/kata-containers/src/agent/protocols/protos/types.proto=github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/agent/protocols,\ \ Mgithub.com/kata-containers/kata-containers/src/agent/protocols/protos/oci.proto=github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/agent/protocols/grpc,\ \ @@ -69,7 +69,7 @@ if [ "$(basename $(pwd))" != "agent" ]; then fi # Protocol buffer files required to generate golang/rust bindings. -proto_files_list=(agent.proto health.proto oci.proto github.com/kata-containers/agent/pkg/types/types.proto) +proto_files_list=(agent.proto health.proto oci.proto types.proto) if [ "$1" = "" ]; then show_usage "${proto_files_list[@]}" diff --git a/src/agent/protocols/protos/agent.proto b/src/agent/protocols/protos/agent.proto index 86852e20c..eb81e45e5 100644 --- a/src/agent/protocols/protos/agent.proto +++ b/src/agent/protocols/protos/agent.proto @@ -1,6 +1,6 @@ // // Copyright 2017 HyperHQ Inc. -// Copyright (c) 2019 Ant Financial +// Copyright (c) 2019-2020 Ant Group // // SPDX-License-Identifier: Apache-2.0 // @@ -12,7 +12,7 @@ option go_package = "github.com/kata-containers/kata-containers/src/runtime/virt package grpc; import "oci.proto"; -import "github.com/kata-containers/agent/pkg/types/types.proto"; +import "types.proto"; import "google/protobuf/empty.proto"; diff --git a/src/agent/protocols/protos/github.com/kata-containers/agent/pkg/types/types.proto b/src/agent/protocols/protos/types.proto similarity index 97% rename from src/agent/protocols/protos/github.com/kata-containers/agent/pkg/types/types.proto rename to src/agent/protocols/protos/types.proto index 9da2491a2..a639d8e1a 100644 --- a/src/agent/protocols/protos/github.com/kata-containers/agent/pkg/types/types.proto +++ b/src/agent/protocols/protos/types.proto @@ -1,6 +1,6 @@ // // Copyright 2018 Intel Corporation. -// Copyright (c) 2019 Ant Financial +// Copyright (c) 2019-2020 Ant Group // // SPDX-License-Identifier: Apache-2.0 //