mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-09-12 20:48:39 +00:00
Revert "Pull underlying capabilities up to 00-multus.conf"
This reverts commit 4c271a57d5
.
This commit is contained in:
@@ -302,24 +302,6 @@ if [ "$MULTUS_CONF_FILE" == "auto" ]; then
|
|||||||
MASTER_PLUGIN_NET_NAME="multus-cni-network"
|
MASTER_PLUGIN_NET_NAME="multus-cni-network"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
capabilities_python_filter_tmpfile=$(mktemp)
|
|
||||||
cat << EOF > $capabilities_python_filter_tmpfile
|
|
||||||
import json,sys
|
|
||||||
conf = json.load(sys.stdin)
|
|
||||||
capabilities = {}
|
|
||||||
for capa in [p['capabilities'] for p in conf['plugins'] if 'capabilities' in p]:
|
|
||||||
capabilities.update({capability:enabled for (capability,enabled) in capa.items() if enabled})
|
|
||||||
if len(capabilities) > 0:
|
|
||||||
print("""\"capabilities\": """ + json.dumps(capabilities) + ",")
|
|
||||||
else:
|
|
||||||
print("")
|
|
||||||
EOF
|
|
||||||
|
|
||||||
NESTED_CAPABILITIES_STRING="$(cat $MULTUS_AUTOCONF_DIR/$MASTER_PLUGIN | \
|
|
||||||
python $capabilities_python_filter_tmpfile)"
|
|
||||||
rm $capabilities_python_filter_tmpfile
|
|
||||||
log "Nested capabilities string: $NESTED_CAPABILITIES_STRING"
|
|
||||||
|
|
||||||
MASTER_PLUGIN_LOCATION=$MULTUS_AUTOCONF_DIR/$MASTER_PLUGIN
|
MASTER_PLUGIN_LOCATION=$MULTUS_AUTOCONF_DIR/$MASTER_PLUGIN
|
||||||
MASTER_PLUGIN_JSON="$(cat $MASTER_PLUGIN_LOCATION)"
|
MASTER_PLUGIN_JSON="$(cat $MASTER_PLUGIN_LOCATION)"
|
||||||
log "Using $MASTER_PLUGIN_LOCATION as a source to generate the Multus configuration"
|
log "Using $MASTER_PLUGIN_LOCATION as a source to generate the Multus configuration"
|
||||||
@@ -328,7 +310,6 @@ EOF
|
|||||||
$CNI_VERSION_STRING
|
$CNI_VERSION_STRING
|
||||||
"name": "$MASTER_PLUGIN_NET_NAME",
|
"name": "$MASTER_PLUGIN_NET_NAME",
|
||||||
"type": "multus",
|
"type": "multus",
|
||||||
$NESTED_CAPABILITIES_STRING
|
|
||||||
$ISOLATION_STRING
|
$ISOLATION_STRING
|
||||||
$LOG_LEVEL_STRING
|
$LOG_LEVEL_STRING
|
||||||
$LOG_FILE_STRING
|
$LOG_FILE_STRING
|
||||||
|
Reference in New Issue
Block a user