Merge "Run dispatch script for all unmanaged devices"

This commit is contained in:
Zuul 2018-06-20 03:57:10 +00:00 committed by Gerrit Code Review
commit a83a792eb5

View File

@ -166,13 +166,9 @@ outputs:
content: >-
#!/bin/bash -x
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.
DEVS=$(nmcli device | grep unmanaged | awk '{print $1}')
VLANS=$(jq '.network_config[] | .members // [] | del( .[] | select( .type != "vlan" ) ) | .[].type + (.[].vlan_id|tostring)' /etc/os-net-config/config.json)
for dev in $DEVS $VLANS;
for dev in $DEVS;
do
temp="${dev%\"}"
temp="${temp#\"}"