Merge pull request #15 from FlorianHeigl/patch-2

match 'vendors' arg between docs and code
This commit is contained in:
minitriga 2021-03-19 09:04:59 +00:00 committed by GitHub
commit 5cb2b033a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ import settings
REPO_URL = settings.REPO_URL
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")
@ -341,8 +341,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")