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.
This commit is contained in:
Florian Heigl 2021-02-09 02:26:59 +01:00 committed by GitHub
parent 0da2558b6d
commit 17cc30f6a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ import settings
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 @@ except exc.GitCommandError as error:
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")