7c7ee59026
This commit introduce the python-binding for iteracting with CRI runtime via GRPC. The client code is generated by protocol buffer [1] by using api.proto in kubernetes/cri-api repo. The generated CRI client code couldn't pass the pep8 check so this commit also configure flake8 to skip the zun/criapi directory. [1] https://developers.google.com/protocol-buffers/docs/pythontutorial Implements: blueprint add-support-cri-runtime Change-Id: I2e1a20b47fec5af1f4977148431e1135abd49812
21 lines
557 B
Bash
Executable File
21 lines
557 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# A simple wrapper around flake8 which makes it possible
|
|
# to ask it to only verify files changed in the current
|
|
# git HEAD patch.
|
|
#
|
|
# Intended to be invoked via tox:
|
|
#
|
|
# tox -epep8 -- -HEAD
|
|
#
|
|
|
|
if test "x$1" = "x-HEAD" ; then
|
|
shift
|
|
files=$(git diff --name-only HEAD~1 | tr '\n' ' ')
|
|
echo "Running flake8 on ${files}"
|
|
diff -u --from-file /dev/null ${files} | flake8 --max-complexity 34 --exclude zun/criapi --diff "$@"
|
|
else
|
|
echo "Running flake8 on all files"
|
|
exec flake8 --max-complexity 34 --exclude zun/criapi "$@"
|
|
fi
|