diff --git a/releasenotes/notes/check-old-style-nic-config-4624a60e3303411b.yaml b/releasenotes/notes/check-old-style-nic-config-4624a60e3303411b.yaml new file mode 100644 index 0000000000..4af632489d --- /dev/null +++ b/releasenotes/notes/check-old-style-nic-config-4624a60e3303411b.yaml @@ -0,0 +1,5 @@ +--- +other: + - Add check for nic config files using the old style format + (os-apply-config) and list the script that can be used + to convert the file. diff --git a/tools/yaml-nic-config-2-script.py b/tools/yaml-nic-config-2-script.py index cdda108f1f..8aba1f364b 100755 --- a/tools/yaml-nic-config-2-script.py +++ b/tools/yaml-nic-config-2-script.py @@ -11,15 +11,31 @@ # License for the specific language governing permissions and limitations # under the License. +import argparse import collections import copy +import datetime import os +import shutil import sys import traceback import yaml import six import re +def parse_opts(argv): + parser = argparse.ArgumentParser( + description='Convert an old style NIC config file into the new format using ' + 'run-os-net-config.sh') + parser.add_argument('--script-dir', metavar='