mirror of
https://github.com/netbox-community/Device-Type-Library-Import.git
synced 2024-11-22 07:33:26 +01:00
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:
parent
0da2558b6d
commit
17cc30f6a3
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user