Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Commit 56a4cbd

Browse files
author
Abhi Keshav
authored
Add gnmi to docker (#38)
* add gnmi * fix
1 parent 3024d33 commit 56a4cbd

File tree

7 files changed

+18
-6
lines changed

7 files changed

+18
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ target/
6161

6262
#Ipython Notebook
6363
.ipynb_checkpoints
64+
.idea/*

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ RUN echo 'Installing dependencies and ydk-py'
88

99
WORKDIR /root/ydk-py
1010

11-
RUN /bin/bash -c './dependencies_xenial.sh && ./tests.sh'
11+
RUN /bin/bash -c './dependencies_xenial.sh && ./dependencies_gnmi.sh && ./tests.sh'

dependencies_centos.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
yum install -y epel-release
44
yum install -y libxslt-devel libssh-devel python-devel cmake3 python-pip which make sudo > /dev/null
5+
./dependencies_gnmi.sh
56
yum install -y https://devhub.cisco.com/artifactory/rpm-ydk/0.8.0/libydk-0.8.0-1.x86_64.rpm > /dev/null
7+
yum install https://devhub.cisco.com/artifactory/rpm-ydk/0.8.0/libydk_gnmi_0.4.0-1.x86_64.rpm > /dev/null
68

79
yum install centos-release-scl -y > /dev/null
810
yum install devtoolset-4-gcc* -y > /dev/null

dependencies_gnmi.sh

100644100755
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,19 @@ function install_protobuf {
3636
make > /dev/null
3737
print_msg "Installing protobuf and protoc"
3838
sudo make install
39-
sudo ldconfig
39+
# sudo ldconfig
4040
cd -
4141
}
4242

4343
function install_grpc {
4444
print_msg "Installing grpc"
45-
4645
git clone -b v1.9.1 https://github.com/grpc/grpc
4746
cd grpc
4847
git submodule update --init
4948
sudo ldconfig
5049
make > /dev/null
5150
sudo make install
52-
sudo ldconfig
51+
# sudo ldconfig
5352
cd -
5453
}
5554

dependencies_osx.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ function print_msg {
77
function install_os_dependencies {
88
brew install curl xml2 doxygen pybind11
99
brew rm -f --ignore-dependencies python python3
10+
11+
./dependencies_gnmi.sh
1012
}
1113

1214
function install_libssh {
@@ -19,8 +21,6 @@ function install_libssh {
1921
cmake ..
2022
sudo make install
2123
cd -
22-
# wget https://devhub.cisco.com/artifactory/osx-ydk/third-party/libssh-0.7.5.pkg
23-
# sudo installer -pkg libssh-0.7.5.pkg -target /
2424
}
2525

2626
function install_libydk {

dependencies_xenial.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,19 @@ apt-get install gcc-5 g++-5 -y > /dev/null
3333
ln -fs /usr/bin/g++-5 /usr/bin/c++
3434
ln -fs /usr/bin/gcc-5 /usr/bin/cc
3535

36+
./dependencies_gnmi.sh
37+
3638
print_msg "Installing YDK 0.8.0 core library"
3739
if [[ $os_info == *"xenial"* ]]; then
3840
run_cmd wget https://devhub.cisco.com/artifactory/debian-ydk/0.8.0/xenial/libydk_0.8.0-1_amd64.deb
41+
run_cmd wget https://devhub.cisco.com/artifactory/debian-ydk/0.8.0/xenial/libydk_gnmi_0.4.0-1_amd64.deb
3942
elif [[ $os_info == *"bionic"* ]]; then
4043
run_cmd wget https://devhub.cisco.com/artifactory/debian-ydk/0.8.0/bionic/libydk_0.8.0-1_amd64.deb
44+
run_cmd wget https://devhub.cisco.com/artifactory/debian-ydk/0.8.0/bionic/libydk_gnmi_0.4.0-1_amd64.deb
4145
else
4246
MSG_COLOR=$RED
4347
print_msg "There are no pre-compiled YDK libraries for this Linux distribution"
4448
exit 1
4549
fi
4650
gdebi -n libydk_0.8.0-1_amd64.deb
51+
gdebi -n libydk_gnmi_0.4.0-1_amd64.deb

tests.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ cd core
7575
${PYTHON_BIN} setup.py sdist
7676
sudo ${PIP_BIN} install dist/ydk*.tar.gz
7777

78+
print_msg "Installing YDK gNMI package"
79+
cd ../gnmi
80+
${PYTHON_BIN} setup.py sdist
81+
sudo ${PIP_BIN} install dist/ydk*.tar.gz
82+
7883
print_msg "Installing ietf bundle package"
7984
cd ../ietf
8085
${PYTHON_BIN} setup.py sdist

0 commit comments

Comments
 (0)