Skip to content

Commit 1583c81

Browse files
committed
Rename from gnmi to cisco_gnmi
1 parent 14c695c commit 1583c81

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

github.com/openconfig/gnmi

Submodule gnmi updated 60 files

update_protos.sh

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
#!/usr/bin/env bash
22
echo "Updating proto sources..."
33
git submodule update --remote
4-
cp github.com/openconfig/gnmi/proto/gnmi/*.proto gnmi/proto/
5-
cp github.com/openconfig/gnmi/proto/gnmi_ext/*.proto gnmi/proto/
4+
cp github.com/openconfig/gnmi/proto/gnmi/*.proto cisco_gnmi/proto/
5+
cp github.com/openconfig/gnmi/proto/gnmi_ext/*.proto cisco_gnmi/proto/
66
echo "Fixing proto imports..."
77
python -c "
8-
with open('gnmi/proto/gnmi.proto', 'r') as gnmi_fd:
8+
with open('cisco_gnmi/proto/gnmi.proto', 'r') as gnmi_fd:
99
file_content = gnmi_fd.read()
1010
file_content = file_content.replace('github.com/openconfig/gnmi/proto/gnmi_ext/', '', 1)
11-
with open('gnmi/proto/gnmi.proto', 'w') as gnmi_fd:
11+
with open('cisco_gnmi/proto/gnmi.proto', 'w') as gnmi_fd:
1212
gnmi_fd.write(file_content)
1313
"
1414
echo "Compiling protos..."
15-
python -m grpc_tools.protoc --proto_path=gnmi/proto --python_out=gnmi/proto --grpc_python_out=gnmi/proto gnmi.proto gnmi_ext.proto
15+
pipenv run python -m grpc_tools.protoc --proto_path=cisco_gnmi/proto --python_out=cisco_gnmi/proto --grpc_python_out=cisco_gnmi/proto gnmi.proto gnmi_ext.proto
1616
echo "Fixing compiled Python imports..."
1717
python -c "
18-
with open('gnmi/proto/gnmi_pb2_grpc.py', 'r') as gnmi_fd:
18+
with open('cisco_gnmi/proto/gnmi_pb2_grpc.py', 'r') as gnmi_fd:
1919
file_content = gnmi_fd.read()
2020
file_content = file_content.replace('import gnmi_pb2', 'from . import gnmi_pb2', 1)
21-
with open('gnmi/proto/gnmi_pb2_grpc.py', 'w') as gnmi_fd:
21+
with open('cisco_gnmi/proto/gnmi_pb2_grpc.py', 'w') as gnmi_fd:
2222
gnmi_fd.write(file_content)
23-
with open('gnmi/proto/gnmi_pb2.py', 'r') as gnmi_fd:
23+
with open('cisco_gnmi/proto/gnmi_pb2.py', 'r') as gnmi_fd:
2424
file_content = gnmi_fd.read()
2525
file_content = file_content.replace('import gnmi_ext_pb2', 'from . import gnmi_ext_pb2', 1)
26-
with open('gnmi/proto/gnmi_pb2.py', 'w') as gnmi_fd:
26+
with open('cisco_gnmi/proto/gnmi_pb2.py', 'w') as gnmi_fd:
2727
gnmi_fd.write(file_content)
2828
"
2929
echo "Cleaning up..."
30-
rm gnmi/proto/*.proto
30+
rm cisco_gnmi/proto/*.proto

0 commit comments

Comments
 (0)