From 17cc30f6a3ee247a9f777e6d6809c2f21f95f927 Mon Sep 17 00:00:00 2001 From: Florian Heigl Date: Tue, 9 Feb 2021 02:26:59 +0100 Subject: [PATCH] match 'vendors' arg between docs and code the arg was called vendor (singular), while most of the code and the readme mentioned 'vendors' (plural) and the arg in fact supports multiple vendors. --- nb-dt-import.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nb-dt-import.py b/nb-dt-import.py index f944a184..c09d725e 100755 --- a/nb-dt-import.py +++ b/nb-dt-import.py @@ -9,7 +9,7 @@ REPO_URL = 'https://github.com/netbox-community/devicetype-library.git' parser = argparse.ArgumentParser(description='Import Netbox Device Types') -parser.add_argument('--vendor', nargs='+', +parser.add_argument('--vendors', nargs='+', help="List of vendors to import eg. apc cisco") parser.add_argument('--url', '--git', default=REPO_URL, help="Git URL with valid Device Type YAML files") @@ -338,8 +338,8 @@ def createDeviceTypes(deviceTypes, nb): nb = pynetbox.api(nbUrl, token=nbToken) -if args.vendor is None: - print("No Vendor Specified, Gathering All Device-Types") +if args.vendors is None: + print("No Vendors Specified, Gathering All Device-Types") files, vendors = getFiles() print(str(len(vendors)) + " Vendors Found") print(str(len(files)) + " Device-Types Found")