blob: 8cb87deea1349d2c4d80cfda87e132192c2ce694 [file] [log] [blame]
Martin Cosyns0efdc872021-09-27 16:24:30 +00001#!/bin/bash
2# Copyright 2020-present Open Networking Foundation
3# Original copyright 2020-present ADTRAN, Inc.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15
16for version in $(curl -s https://pypi.org/pypi/device-management-interface/json | jq '.releases | keys' | jq '.[]'); do
17 version=${version//\"/}
18 filename=dmi_${version//\./\_}
19
20 if [ -d ./grpc_robot/services/dmi/"$filename" ]; then
21
22 python3 -m pip install -q device-management-interface=="$version"
23
24 python3 -m robot.libdoc -P . grpc_robot.Dmi docs/"$filename".html
25 python3 -m robot.libdoc -P . grpc_robot.Dmi docs/"$filename".xml
26 fi
27
28done
29
30for version in $(curl -s https://pypi.org/pypi/voltha-protos/json | jq '.releases | keys' | jq '.[]'); do
31 version=${version//\"/}
32 filename=voltha_${version//\./\_}
33
34 if [ -d ./grpc_robot/services/voltha/"$filename" ]; then
35
36 python3 -m pip install -q voltha-protos=="$version"
37
38 python3 -m robot.libdoc -P . grpc_robot.Voltha docs/"$filename".html
39 python3 -m robot.libdoc -P . grpc_robot.Voltha docs/"$filename".xml
40 fi
41
42done
43
44python3 -m robot.libdoc -P . grpc_robot.Collections docs/collections.html
45python3 -m robot.libdoc -P . grpc_robot.Collections docs/collections.xml
46python3 -m robot.libdoc -P . grpc_robot.DmiTools docs/dmi_tools.html
47python3 -m robot.libdoc -P . grpc_robot.DmiTools docs/dmi_tools.xml
48python3 -m robot.libdoc -P . grpc_robot.VolthaTools docs/voltha_tools.html
49python3 -m robot.libdoc -P . grpc_robot.VolthaTools docs/voltha_tools.xml