blob: 3d8e910e763268c4fa4cf89ea212b08bcd94d07d [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
Andrea Campanella81477512022-02-07 13:05:57 +000025 # python3 -m robot.libdoc -P . grpc_robot.Dmi docs/"$filename".xml
Martin Cosyns0efdc872021-09-27 16:24:30 +000026 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
Andrea Campanella81477512022-02-07 13:05:57 +000039 # python3 -m robot.libdoc -P . grpc_robot.Voltha docs/"$filename".xml
Martin Cosyns0efdc872021-09-27 16:24:30 +000040 fi
41
42done
43
44python3 -m robot.libdoc -P . grpc_robot.Collections docs/collections.html
Andrea Campanella81477512022-02-07 13:05:57 +000045# python3 -m robot.libdoc -P . grpc_robot.Collections docs/collections.xml
Martin Cosyns0efdc872021-09-27 16:24:30 +000046python3 -m robot.libdoc -P . grpc_robot.DmiTools docs/dmi_tools.html
Andrea Campanella81477512022-02-07 13:05:57 +000047# python3 -m robot.libdoc -P . grpc_robot.DmiTools docs/dmi_tools.xml
Martin Cosyns0efdc872021-09-27 16:24:30 +000048python3 -m robot.libdoc -P . grpc_robot.VolthaTools docs/voltha_tools.html
Andrea Campanella81477512022-02-07 13:05:57 +000049# python3 -m robot.libdoc -P . grpc_robot.VolthaTools docs/voltha_tools.xml