blob: 3ffc3a9ab29a6a0807f36e6023cf728e957e6719 [file] [log] [blame]
Matteo Scandolo4747d292019-08-05 11:50:18 -07001# Copyright 2019-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
Matteo Scandolo0b603aa2020-08-21 14:40:48 -070015SHELL = bash -e -o pipefail
Matteo Scandolo4747d292019-08-05 11:50:18 -070016VERSION ?= $(shell cat ./VERSION)
Matteo Scandolo84f7d482019-08-08 19:00:47 -070017DIFF ?= $(git diff --shortstat 2> /dev/null | tail -n1)
Zdravko Bozakov2da76342019-10-21 09:47:35 +020018GIT_STATUS ?= $(shell [ -z "$DIFF" ] && echo "Dirty" || echo "Clean")
Matteo Scandolo4747d292019-08-05 11:50:18 -070019
20## Docker related
21DOCKER_TAG ?= ${VERSION}
Matteo Scandolo5daa2ab2019-10-08 08:27:18 -070022DOCKER_REPOSITORY ?= ""
Matteo Scandolo4747d292019-08-05 11:50:18 -070023DOCKER_REGISTRY ?= ""
Matteo Scandolo4b3fc7e2019-09-17 16:49:54 -070024DOCKER_RUN_ARGS ?= ""
Andrea Campanellad683d162020-10-13 16:40:27 +020025DOCKER_PORTS ?= -p 50070:50070 -p 50060:50060 -p 50071:50071 -p 50072:50072 -p 50073:50073 -p 50074:50074 -p 50075:50075
Andrea Campanella64dffd52019-12-17 17:29:57 -080026TYPE ?= minimal
Zdravko Bozakov2da76342019-10-21 09:47:35 +020027
Kent Hagerman60d62302020-03-10 17:02:36 -040028# tool containers
Matteo Scandolo34a9ea32020-11-19 17:40:49 -080029VOLTHA_TOOLS_VERSION ?= 2.3.1
Zdravko Bozakov2da76342019-10-21 09:47:35 +020030
Kent Hagerman60d62302020-03-10 17:02:36 -040031GO = docker run --rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app $(shell test -t 0 && echo "-it") -v gocache:/.cache -v gocache-${VOLTHA_TOOLS_VERSION}:/go/pkg voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-golang go
32GO_SH = docker run --rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app $(shell test -t 0 && echo "-it") -v gocache:/.cache -v gocache-${VOLTHA_TOOLS_VERSION}:/go/pkg voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-golang sh -c '
Kent Hagerman60d62302020-03-10 17:02:36 -040033GO_JUNIT_REPORT = docker run --rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app -i voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-go-junit-report go-junit-report
Matteo Scandolo34a9ea32020-11-19 17:40:49 -080034GOCOVER_COBERTURA = docker run --rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app/src/github.com/opencord/bbsim -i voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-gocover-cobertura gocover-cobertura
Matteo Scandolo90d08f62020-10-29 12:06:55 -070035GOLANGCI_LINT = docker run --rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app $(shell test -t 0 && echo "-it") -v gocache:/.cache -v gocache-${VOLTHA_TOOLS_VERSION}:/go/pkg voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-golangci-lint golangci-lint
Kent Hagerman60d62302020-03-10 17:02:36 -040036HADOLINT = docker run --rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app $(shell test -t 0 && echo "-it") voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-hadolint hadolint
37PROTOC = docker run --rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app $(shell test -t 0 && echo "-it") -v gocache-${VOLTHA_TOOLS_VERSION}:/go/pkg voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-protoc protoc
38
Matteo Scandolo4747d292019-08-05 11:50:18 -070039# Public targets
Matteo Scandolo4747d292019-08-05 11:50:18 -070040all: help
41
Kent Hagerman60d62302020-03-10 17:02:36 -040042protos: api/bbsim/bbsim.pb.go api/bbsim/bbsim.pb.gw.go api/legacy/bbsim.pb.go api/legacy/bbsim.pb.gw.go # @HELP Build proto files
Matteo Scandolo01d41ce2019-10-28 15:42:47 -070043
Matteo Scandolo6866b8c2019-10-28 16:15:24 -070044.PHONY: build
Kent Hagerman60d62302020-03-10 17:02:36 -040045build: protos build-bbsim build-bbsimctl build-bbr
46
47## lint and unit tests
48
49lint-dockerfile:
50 @echo "Running Dockerfile lint check..."
51 @${HADOLINT} $$(find ./build -name "Dockerfile*")
52 @echo "Dockerfile lint check OK"
53
54lint-mod:
55 @echo "Running dependency check..."
56 @${GO} mod verify
57 @echo "Dependency check OK. Running vendor check..."
58 @git status > /dev/null
59 @git diff-index --quiet HEAD -- go.mod go.sum vendor || (echo "ERROR: Staged or modified files must be committed before running this test" && git status -- go.mod go.sum vendor && exit 1)
60 @[[ `git ls-files --exclude-standard --others go.mod go.sum vendor` == "" ]] || (echo "ERROR: Untracked files must be cleaned up before running this test" && git status -- go.mod go.sum vendor && exit 1)
61 ${GO} mod tidy
62 ${GO} mod vendor
63 @git status > /dev/null
64 @git diff-index --quiet HEAD -- go.mod go.sum vendor || (echo "ERROR: Modified files detected after running go mod tidy / go mod vendor" && git status -- go.mod go.sum vendor && git checkout -- go.mod go.sum vendor && exit 1)
65 @[[ `git ls-files --exclude-standard --others go.mod go.sum vendor` == "" ]] || (echo "ERROR: Untracked files detected after running go mod tidy / go mod vendor" && git status -- go.mod go.sum vendor && git checkout -- go.mod go.sum vendor && exit 1)
66 @echo "Vendor check OK."
67
68lint: lint-mod lint-dockerfile
69
Matteo Scandolo90d08f62020-10-29 12:06:55 -070070sca:
Kent Hagerman60d62302020-03-10 17:02:36 -040071 @rm -rf ./sca-report
72 @mkdir -p ./sca-report
73 @echo "Running static code analysis..."
Matteo Scandolo90d08f62020-10-29 12:06:55 -070074 @${GOLANGCI_LINT} run --deadline=4m --out-format junit-xml ./... | tee ./sca-report/sca-report.xml
Kent Hagerman60d62302020-03-10 17:02:36 -040075 @echo ""
76 @echo "Static code analysis OK"
Matteo Scandolo4747d292019-08-05 11:50:18 -070077
Matteo Scandolo0e9fabf2020-09-30 17:19:27 -070078test: docs-lint test-unit test-bbr
Matteo Scandolo569e7172019-12-20 11:51:51 -080079
Matteo Scandolo90d08f62020-10-29 12:06:55 -070080test-unit: clean local-omci-sim # @HELP Execute unit tests
81 @echo "Running unit tests..."
Kent Hagerman60d62302020-03-10 17:02:36 -040082 @mkdir -p ./tests/results
Matteo Scandolo90d08f62020-10-29 12:06:55 -070083 @${GO} test -mod=vendor -v -coverprofile ./tests/results/go-test-coverage.out -covermode count ./... 2>&1 | tee ./tests/results/go-test-results.out ;\
Kent Hagerman60d62302020-03-10 17:02:36 -040084 RETURN=$$? ;\
85 ${GO_JUNIT_REPORT} < ./tests/results/go-test-results.out > ./tests/results/go-test-results.xml ;\
86 ${GOCOVER_COBERTURA} < ./tests/results/go-test-coverage.out > ./tests/results/go-test-coverage.xml ;\
87 exit $$RETURN
Matteo Scandolo4747d292019-08-05 11:50:18 -070088
Kent Hagerman60d62302020-03-10 17:02:36 -040089test-bbr: release-bbr docker-build # @HELP Validate that BBSim and BBR are working together
Matteo Scandolo4a036262020-08-17 15:56:13 -070090 DOCKER_RUN_ARGS="-pon 2 -onu 2" make docker-run
Matteo Scandolo569e7172019-12-20 11:51:51 -080091 sleep 5
Matteo Scandoloc11074d2020-09-14 14:59:24 -070092 ./$(RELEASE_DIR)/$(RELEASE_BBR_NAME)-linux-amd64 -pon 2 -onu 2 -logfile tmp.logs
Matteo Scandolo569e7172019-12-20 11:51:51 -080093 docker rm -f bbsim
94
Kent Hagerman60d62302020-03-10 17:02:36 -040095mod-update: # @HELP Download the dependencies to the vendor folder
96 ${GO} mod tidy
97 ${GO} mod vendor
Matteo Scandolo38305492019-10-11 11:36:00 -070098
Matteo Scandolo4f4ac792020-10-01 16:33:21 -070099docker-build: local-omci-sim local-protos# @HELP Build the BBSim docker container (contains BBSimCtl too)
Kent Hagerman60d62302020-03-10 17:02:36 -0400100 docker build \
101 -t ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}bbsim:${DOCKER_TAG} \
102 -f build/package/Dockerfile .
Matteo Scandolo4747d292019-08-05 11:50:18 -0700103
Matteo Scandolo01d41ce2019-10-28 15:42:47 -0700104docker-push: # @HELP Push the docker container to a registry
Matteo Scandolo4747d292019-08-05 11:50:18 -0700105 docker push ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}bbsim:${DOCKER_TAG}
106
Andrea Campanella64dffd52019-12-17 17:29:57 -0800107docker-kind-load:
108 @if [ "`kind get clusters | grep voltha-$(TYPE)`" = '' ]; then echo "no voltha-$(TYPE) cluster found" && exit 1; fi
109 kind load docker-image ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}bbsim:${DOCKER_TAG} --name=voltha-$(TYPE) --nodes $(shell kubectl get nodes --template='{{range .items}}{{.metadata.name}},{{end}}' | sed 's/,$$//')
110
Matteo Scandoloe383d5d2019-10-25 14:47:27 -0700111docker-run: # @HELP Runs the container locally (available options: DOCKER_RUN_ARGS="-pon 2 -onu 2" make docker-run)
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200112 docker run -d ${DOCKER_PORTS} --privileged --rm --name bbsim ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}bbsim:${DOCKER_TAG} /app/bbsim ${DOCKER_RUN_ARGS}
Matteo Scandolo4b3fc7e2019-09-17 16:49:54 -0700113
Matteo Scandoloe383d5d2019-10-25 14:47:27 -0700114docker-run-dev: # @HELP Runs the container locally (intended for development purposes, not in detached mode)
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200115 docker run ${DOCKER_PORTS} --privileged --rm --name bbsim ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}bbsim:${DOCKER_TAG} /app/bbsim ${DOCKER_RUN_ARGS}
Matteo Scandoloe383d5d2019-10-25 14:47:27 -0700116
Zack Williams4b0ef4d2019-12-18 14:25:20 -0700117.PHONY: docs docs-lint
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200118docs: swagger # @HELP Generate docs and opens them in the browser
Zack Williams4b0ef4d2019-12-18 14:25:20 -0700119 make -C docs html
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200120 @echo -e "\nBBSim documentation generated in file://${PWD}/docs/build/html/index.html"
Matteo Scandolo40e067f2019-10-16 16:59:41 -0700121
Zack Williams4b0ef4d2019-12-18 14:25:20 -0700122docs-lint:
123 make -C docs lint
124
Matteo Scandolo8dea3992019-10-22 10:54:25 -0700125# Release related items
126# Generates binaries in $RELEASE_DIR with name $RELEASE_NAME-$RELEASE_OS_ARCH
127# Inspired by: https://github.com/kubernetes/minikube/releases
128RELEASE_DIR ?= release
129RELEASE_OS_ARCH ?= linux-amd64 linux-arm64 windows-amd64 darwin-amd64
130
Kent Hagerman60d62302020-03-10 17:02:36 -0400131RELEASE_BBR_NAME ?= bbr
132RELEASE_BBSIM_NAME ?= bbsim
133RELEASE_BBSIMCTL_NAME ?= bbsimctl
Matteo Scandolo8dea3992019-10-22 10:54:25 -0700134
Matteo Scandolo90d08f62020-10-29 12:06:55 -0700135release-bbr:
Kent Hagerman60d62302020-03-10 17:02:36 -0400136 @echo "$(RELEASE_BBR_NAME)-linux-amd64"
Matteo Scandolo90d08f62020-10-29 12:06:55 -0700137 @${GO} build -mod vendor \
Kent Hagerman60d62302020-03-10 17:02:36 -0400138 -ldflags "-w -X main.buildTime=$(shell date +%Y/%m/%d-%H:%M:%S) \
139 -X main.commitHash=$(shell git log --pretty=format:%H -n 1) \
140 -X main.gitStatus=${GIT_STATUS} \
141 -X main.version=${VERSION}" \
142 -o "$(RELEASE_DIR)/$(RELEASE_BBR_NAME)-linux-amd64" ./cmd/bbr
Matteo Scandolo8dea3992019-10-22 10:54:25 -0700143
Matteo Scandolo90d08f62020-10-29 12:06:55 -0700144release-bbsim:
Kent Hagerman60d62302020-03-10 17:02:36 -0400145 @echo "$(RELEASE_BBSIM_NAME)-linux-amd64"
Matteo Scandolo90d08f62020-10-29 12:06:55 -0700146 @${GO} build -mod vendor \
Kent Hagerman60d62302020-03-10 17:02:36 -0400147 -ldflags "-w -X main.buildTime=$(shell date +%Y/%m/%d-%H:%M:%S) \
148 -X main.commitHash=$(shell git log --pretty=format:%H -n 1) \
149 -X main.gitStatus=${GIT_STATUS} \
150 -X main.version=${VERSION}" \
151 -o "$(RELEASE_DIR)/$(RELEASE_BBSIM_NAME)-linux-amd64" ./cmd/bbsim
Matteo Scandolo8dea3992019-10-22 10:54:25 -0700152
Kent Hagerman60d62302020-03-10 17:02:36 -0400153release-bbsimctl:
154 @${GO_SH} set -eo pipefail; \
155 for os_arch in ${RELEASE_OS_ARCH}; do \
156 echo "$(RELEASE_BBSIMCTL_NAME)-$$os_arch"; \
157 GOOS="$${os_arch%-*}" GOARCH="$${os_arch#*-}" go build -mod vendor \
158 -ldflags "-w -X github.com/opencord/bbsim/internal/bbsimctl/config.BuildTime=$(shell date +%Y/%m/%d-%H:%M:%S) \
159 -X github.com/opencord/bbsim/internal/bbsimctl/config.CommitHash=$(shell git log --pretty=format:%H -n 1) \
160 -X github.com/opencord/bbsim/internal/bbsimctl/config.GitStatus=${GIT_STATUS} \
161 -X github.com/opencord/bbsim/internal/bbsimctl/config.Version=${VERSION}" \
162 -o "$(RELEASE_DIR)/$(RELEASE_BBSIMCTL_NAME)-$$os_arch" ./cmd/bbsimctl; \
163 done'
164
165.PHONY: release release-bbr release-bbsim release-bbsimctl
166release: release-bbr release-bbsim release-bbsimctl # @HELP Creates release ready bynaries for BBSimctl and BBR artifacts
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200167swagger: docs/swagger/bbsim/bbsim.swagger.json docs/swagger/leagacy/bbsim.swagger.json # @HELP Generate swagger documentation for BBSim API
Matteo Scandolo8dea3992019-10-22 10:54:25 -0700168
Matteo Scandolo4747d292019-08-05 11:50:18 -0700169help: # @HELP Print the command options
170 @echo
171 @echo "\033[0;31m BroadBand Simulator (BBSim) \033[0m"
172 @echo
173 @echo Emulates the control plane of an openolt compatible device
174 @echo Useful for development and scale testing
175 @echo
176 @grep -E '^.*: .* *# *@HELP' $(MAKEFILE_LIST) \
177 | sort \
178 | awk ' \
179 BEGIN {FS = ": .* *# *@HELP"}; \
180 {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}; \
181 '
182
Matteo Scandoloca08fc72019-12-04 14:17:39 -0800183## Local Development Helpers
184local-omci-sim:
185ifdef LOCAL_OMCI_SIM
186 mkdir -p vendor/github.com/opencord/omci-sim/
187 cp -r ${LOCAL_OMCI_SIM}/* vendor/github.com/opencord/omci-sim/
188endif
Matteo Scandolo4747d292019-08-05 11:50:18 -0700189
Matteo Scandolo4f4ac792020-10-01 16:33:21 -0700190local-protos: ## Copies a local version of the voltha-protos dependency into the vendor directory
191ifdef LOCAL_PROTOS
192 rm -rf vendor/github.com/opencord/voltha-protos/v4/go
193 mkdir -p vendor/github.com/opencord/voltha-protos/v4/go
194 cp -r ${LOCAL_PROTOS}/go/* vendor/github.com/opencord/voltha-protos/v4/go
195 rm -rf vendor/github.com/opencord/voltha-protos/v4/go/vendor
196endif
197
Matteo Scandolo4747d292019-08-05 11:50:18 -0700198# Internals
Matteo Scandolo8dea3992019-10-22 10:54:25 -0700199
Matteo Scandolo3de9de02019-11-14 13:40:03 -0800200clean:
Kent Hagerman60d62302020-03-10 17:02:36 -0400201 @rm -f bbsim
202 @rm -f bbsimctl
203 @rm -f bbr
204 @rm -rf tools/bin
205 @rm -rf release/*
Matteo Scandolo3de9de02019-11-14 13:40:03 -0800206
Matteo Scandolo4f4ac792020-10-01 16:33:21 -0700207build-bbr: local-omci-sim local-protos
Kent Hagerman60d62302020-03-10 17:02:36 -0400208 @go build -mod vendor \
209 -ldflags "-w -X main.buildTime=$(shell date +%Y/%m/%d-%H:%M:%S) \
210 -X main.commitHash=$(shell git log --pretty=format:%H -n 1) \
211 -X main.gitStatus=${GIT_STATUS} \
212 -X main.version=${VERSION}" \
213 ./cmd/bbr
Matteo Scandolo40e067f2019-10-16 16:59:41 -0700214
Matteo Scandolo8df63df2019-09-12 10:34:32 -0700215build-bbsim:
Kent Hagerman60d62302020-03-10 17:02:36 -0400216 @go build -mod vendor \
217 -ldflags "-w -X main.buildTime=$(shell date +%Y/%m/%d-%H:%M:%S) \
218 -X main.commitHash=$(shell git log --pretty=format:%H -n 1) \
219 -X main.gitStatus=${GIT_STATUS} \
220 -X main.version=${VERSION}" \
221 ./cmd/bbsim
Matteo Scandolo8df63df2019-09-12 10:34:32 -0700222
223build-bbsimctl:
Kent Hagerman60d62302020-03-10 17:02:36 -0400224 @go build -mod vendor \
225 -ldflags "-w -X github.com/opencord/bbsim/internal/bbsimctl/config.BuildTime=$(shell date +%Y/%m/%d-%H:%M:%S) \
226 -X github.com/opencord/bbsim/internal/bbsimctl/config.CommitHash=$(shell git log --pretty=format:%H -n 1) \
227 -X github.com/opencord/bbsim/internal/bbsimctl/config.GitStatus=${GIT_STATUS} \
228 -X github.com/opencord/bbsim/internal/bbsimctl/config.Version=${VERSION}" \
229 ./cmd/bbsimctl
Matteo Scandolo4747d292019-08-05 11:50:18 -0700230
Kent Hagerman60d62302020-03-10 17:02:36 -0400231setup_tools:
232 @echo "Downloading dependencies..."
Matteo Scandolo4f4ac792020-10-01 16:33:21 -0700233 @${GO} mod download github.com/grpc-ecosystem/grpc-gateway github.com/opencord/voltha-protos/v4
Kent Hagerman60d62302020-03-10 17:02:36 -0400234 @echo "Dependencies downloaded OK"
Matteo Scandolo84f7d482019-08-08 19:00:47 -0700235
Matteo Scandolo4f4ac792020-10-01 16:33:21 -0700236VOLTHA_PROTOS ?= $(shell ${GO} list -f '{{ .Dir }}' -m github.com/opencord/voltha-protos/v4)
Kent Hagerman60d62302020-03-10 17:02:36 -0400237GOOGLEAPI ?= $(shell ${GO} list -f '{{ .Dir }}' -m github.com/grpc-ecosystem/grpc-gateway)
Matteo Scandolo4747d292019-08-05 11:50:18 -0700238
Kent Hagerman60d62302020-03-10 17:02:36 -0400239.PHONY: api/openolt/openolt.pb.go api/bbsim/bbsim.pb.go api/bbsim/bbsim.pb.gw.go api/legacy/bbsim.pb.go api/legacy/bbsim.pb.gw.go docs/swagger/bbsim/bbsim.swagger.json docs/swagger/leagacy/bbsim.swagger.json
240api/openolt/openolt.pb.go: api/openolt/openolt.proto setup_tools
241 @echo $@
242 @${PROTOC} -I. \
243 -I${GOOGLEAPI}/third_party/googleapis \
244 --go_out=plugins=grpc:./ \
245 $<
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200246
Kent Hagerman60d62302020-03-10 17:02:36 -0400247api/bbsim/bbsim.pb.go api/bbsim/bbsim.pb.gw.go: api/bbsim/bbsim.proto api/bbsim/bbsim.yaml setup_tools
248 @echo $@
249 @${PROTOC} -I. \
250 -I${GOOGLEAPI}/third_party/googleapis \
251 -I${VOLTHA_PROTOS}/protos/ \
252 --go_out=plugins=grpc:./ \
253 --grpc-gateway_out=logtostderr=true,grpc_api_configuration=api/bbsim/bbsim.yaml,allow_delete_body=true:./ \
254 $<
Zdravko Bozakov2da76342019-10-21 09:47:35 +0200255
Kent Hagerman60d62302020-03-10 17:02:36 -0400256api/legacy/bbsim.pb.go api/legacy/bbsim.pb.gw.go: api/legacy/bbsim.proto setup_tools
257 @echo $@
258 @${PROTOC} -I. \
259 -I${GOOGLEAPI}/third_party/googleapis/ \
260 -I${GOOGLEAPI}/ \
261 -I${VOLTHA_PROTOS}/protos/ \
262 --go_out=plugins=grpc:./ \
263 --grpc-gateway_out=logtostderr=true,allow_delete_body=true:./ \
264 $<
265
266docs/swagger/bbsim/bbsim.swagger.json: api/bbsim/bbsim.yaml setup_tools
267 @echo $@
268 @${PROTOC} -I ./api \
269 -I${GOOGLEAPI}/ \
270 -I${VOLTHA_PROTOS}/protos/ \
Zack Williamsd2907e62020-04-03 10:23:02 -0700271 --swagger_out=logtostderr=true,allow_delete_body=true,disable_default_errors=true,grpc_api_configuration=$<:docs/swagger/ \
Kent Hagerman60d62302020-03-10 17:02:36 -0400272 api/bbsim/bbsim.proto
273
274docs/swagger/leagacy/bbsim.swagger.json: api/legacy/bbsim.proto setup_tools
275 @echo $@
276 @${PROTOC} -I ./api \
277 -I${GOOGLEAPI}/ \
278 -I${VOLTHA_PROTOS}/protos/ \
Zack Williamsd2907e62020-04-03 10:23:02 -0700279 --swagger_out=logtostderr=true,allow_delete_body=true,disable_default_errors=true:docs/swagger/ \
Kent Hagerman60d62302020-03-10 17:02:36 -0400280 $<