Skip to content

Commit

Permalink
Merge pull request #156 from openconfig/gnoi_bootz
Browse files Browse the repository at this point in the history
Add gNOI API to access Boot config namespace in Bootz
  • Loading branch information
xw-g authored Feb 4, 2024
2 parents f62dc1b + 5bf1db8 commit 9708792
Show file tree
Hide file tree
Showing 8 changed files with 667 additions and 1,784 deletions.
21 changes: 18 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
### Bazel rules for many languages to compile PROTO into gRPC libraries
http_archive(
name = "rules_proto_grpc",
sha256 = "f87d885ebfd6a1bdf02b4c4ba5bf6fb333f90d54561e4d520a8413c8d1fb7beb",
strip_prefix = "rules_proto_grpc-4.5.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/4.5.0.tar.gz"],
sha256 = "c0d718f4d892c524025504e67a5bfe83360b3a982e654bc71fed7514eb8ac8ad",
strip_prefix = "rules_proto_grpc-4.6.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/4.6.0.tar.gz"],
)

load(
Expand Down Expand Up @@ -40,6 +40,14 @@ bazel_gazelle()

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")

go_repository(
name = "com_github_openconfig_bootz",
importpath = "github.com/openconfig/bootz",
sum = "h1:pCBi4GXcT+XM2Vud8kh0Q6uyw6oUxN1CFvrxnW+I/as=",
version = "v0.1.1",
)


go_repository(
name = "com_github_openconfig_gnmi",
build_directives = [
Expand All @@ -51,6 +59,13 @@ go_repository(
version = "v0.0.0-20220617175856-41246b1b3507",
)

go_repository(
name = "com_github_openconfig_gnsi",
importpath = "github.com/openconfig/gnsi",
sum = "h1:oHdSFP1CpP+mfv6IOKWefHpbW3Fy9ZOSHgPgpCb8EDU=",
version = "v1.2.4",
)

go_repository(
name = "com_github_kylelemons_godebug",
importpath = "github.com/kylelemons/godebug",
Expand Down
61 changes: 61 additions & 0 deletions bootconfig/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")

#Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

package(
default_visibility = ["//visibility:public"],
licenses = ["notice"],
)

proto_library(
name = "bootconfig_proto",
srcs = ["bootconfig.proto"],
deps = [
"//types:types_proto",
"@com_github_openconfig_bootz//proto:bootz_proto",
],
)

cc_proto_library(
name = "bootconfig_cc_proto",
deps = [":bootconfig_proto"],
)

cc_grpc_library(
name = "bootconfig_cc_grpc_proto",
srcs = [":bootconfig_proto"],
grpc_only = True,
deps = [":bootconfig_cc_proto"],
)

go_proto_library(
name = "bootconfig_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/openconfig/gnoi/bootconfig",
proto = ":bootconfig_proto",
deps = [
"//types",
"@com_github_openconfig_bootz//proto:bootz_go_proto",
],
)

go_library(
name = "bootconfig",
embed = [":bootconfig_go_proto"],
importpath = "github.com/openconfig/gnoi/bootconfig",
)
Loading

0 comments on commit 9708792

Please sign in to comment.