Closed derek-shnosh closed 5 years ago
What if we make this ztp request external-keystore-test <store_name> id <id>
? Then it will search the external keystore and give you your example output. Will that do what you are looking for?
Given that this is an enhancement request, I wouldn't turn my nose at it. Especially since I can't code my preference on my own.
But my ultimate goal would be to have it query all external (or simply all) keystores until found, ACL-esque... return a 'not found' if, well, not found. Maybe specifying the keystore <store_name>
after the serial number <id>
to define a smaller search scope.
e.g.
ztp query <id> <store_name>
_where storename is optional.
Reasoning is that of the 500+ switches we're putting this to work on, over half are 3850's that are going to spread across three or four different external keystores and associated templates... so not having to specify the keystore name when searching a serial number for what its valid variables should be, would be nice.
Yea I think this feature makes sense to implement. I think the syntax will be ztp lookup where the external keystore part will be optional and ZTP will search all keystores if it is not defined. I'm changing the action from query
to lookup
as it seems more descriptive.
I think the syntax will be ztp request lookup <id> (external-keystore <exkeystore_name>)
Added to enhancement list. Closing
I'm interested in a new command from ZTP:
ztp query _keystore_id_
Where the result would be like grepping the external-keystore-test function for a _keystoreid in the csv file; e.g.
ztp request external-keystore-test _store_name_ | grep _keystore_id_
Example output for the external keystore (csv)
ACCESS
and the keystore_id (or serial number) FDO1234567890.derek@freeztp:~$ ztp query FDO12346789
Would output the same as...