Run the dispatch script for vlans as well

The dispatch script is only executed for interfaces managed by
os-net-config but not for their vlans. This patch gets the vlans
that belong to every interface and adds them to the list of interfaces
to scan.

Change-Id: I44517d2fda0f6252634aa76d41e7a5bb3622456b
This commit is contained in:
Flavio Percoco
2018-04-09 13:28:23 +02:00
parent b0f581ea67
commit b7fe99e172

View File

@@ -179,7 +179,13 @@ outputs:
content: >-
#!/bin/bash -x
for dev in $(jq '.network_config[] | {name}.name' /etc/os-net-config/config.json);
DEVS=$(jq '.network_config[] | {name}.name' /etc/os-net-config/config.json)
# NOTE(flaper87): We should, eventually, set the name on the vlan objects
# inside the os-net-config config.json file and use that.
VLANS=$(jq '.network_config[] | .members // [] | del( .[] | select( .type != "vlan" ) ) | .[].type + (.[].vlan_id|tostring)' /etc/os-net-config/config.json)
for dev in $DEVS $VLANS;
do
temp="${dev%\"}"
temp="${temp#\"}"