Validate Lab Network
netlab validate executes tests defined in the validate lab topology attribute on a running lab. It can be used in training labs to check whether the user has successfully completed the lab assignment.
Usage
$ netlab validate -h
usage: netlab inspect [-h] [-v] [-q] [--list] [--node NODES] [--skip-wait] [-e]
                      [--dump {result} [{result} ...]] [-i INSTANCE]
                      [tests ...]
Inspect data structures in transformed lab topology
positional arguments:
  tests                 Validation test(s) to execute (default: all)
options:
  -h, --help            show this help message and exit
  -v, --verbose         Verbose logging (add multiple flags for increased verbosity)
  -q, --quiet           Report only major errors
  --list                List validation tests
  --node NODES          Execute validation tests only on selected node(s)
  --skip-wait           Skip the waiting period
  -e, --error-only      Display only validation errors (on stderr)
  --dump {result} [{result} ...]
                        Dump additional information during validation process
  -i INSTANCE, --instance INSTANCE
                        Specify lab instance to validate
The netlab validate command returns the overall test results in its exit code:
Exit code  | 
Meaning  | 
|---|---|
0  | 
All tests passed  | 
1  | 
At least one test failed  | 
2  | 
  | 
3  | 
Some of the tests generated warnings  | 
Example
netlab validate command was executed on the Advertise IPv4 Prefixes to BGP Neighbors lab before the user configured BGP prefix origination:

Tip
Use netlab validate –error-only to shorten the printout and display only the validation errors.