0

We have a CLI-based app. that reads input from a JSON/YAML-like format called YANG and present the objects as CLI arguments, and I am supposed to test that, but i am clueless on where to start.

example:

root@beer#./app -a web_url -b web_username -c web_password -d port

The app is simply giving the user a way to pass values to variables that are defined in YANG, its a networking app that provisions routers and switches.

I need to make sure that all the YANG objects are available as CLI arguments (i.e: nothing is missing), so i am basically looking for automating that task of comparing CLI arguments with YANG objects.

I'd appreciate suggestions on how this can be done for a novice programmer.

Jordan Running
  • 102,619
  • 17
  • 182
  • 182
  • JSON has no *variables*, nor has YAML, so we do not know what you mean with that. *leverage* is a bs-bingo-buzzword that does not give us the faintest clue about what your app actually does. Your example misses any link to JSON/YAML. You are asking for *available modules* without any hint about what framework or language you use. Moreover, asking for tools or software libraries is off-topic here. Please improve your question. – flyx Apr 05 '17 at 07:57
  • I've removed the json and yaml tags and added the [tag:ietf-netmod-yang] tag. The former are not related to the latter. – Jordan Running Apr 15 '17 at 20:14
  • You could find a YANG based instance validator, create an instance document (usually JSON or XML) based on your CLI arguments and then validate this instance against YANG (the latter is not a format, it is a schema language like XML Schema). – predi Apr 19 '17 at 13:15
  • CLI-based app written on which language? bash, python, perl, java ? you will need Yang parser for the language you use in the cli-based app. – Ahmed Hashim Aug 10 '17 at 08:20

0 Answers0