Pull underlying capabilities up to 00-multus.conf #545
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in issue #544 the nested plugin
capabilities
are not integrated in the00-multus.conf
file generated by theimages/entrypoint.sh
file.I implemented the parsing of the underlying master plugin json configuration file with python, to retrieve the nested capabilities and to integrate them in the top-level section of the
00-multus.conf
file (because it is not sufficient to have capabilities declared in thedelegates
section of the CNI config file.)The python script for analyzing underlying plugins capabilities is compatible with Python 2 and Python 3, it could be a bit shorter if I used only Python 3 syntax, but I noticed that the Dockerfile is based on a CentOS version that uses Phyton 2.
When no capabilities in the underlying plugins, then nothing gets added to the
00-multus.conf
file.