Quick Start Guide¶
Get up and running with YANG model validation in just a few steps.
Prerequisites¶
- Git: For cloning the repository
- Python 3.8+: For YANG tools and validation
- macOS/Linux: Windows users should use WSL
New User Setup¶
1. Clone the Repository¶
Fast Setup Available
For faster setup, skip --recursive
during clone and use our optimized scripts instead.
2. Fast Setup (Recommended)¶
Setup Options
make setup
: Complete workflow (recommended)shallow
: Fast setup with shallow clones (default)ci
: Fastest for automated buildsfull
: Complete git history (slower)
3. Traditional Setup (Slower)¶
This script will: - Create a Python virtual environment - Install required packages (pyang, etc.) - Verify YANG tool availability - Test basic functionality
4. Activate and Test¶
# Activate the environment
source venv/bin/activate
# Test BGP model validation (using Makefile)
make validate
# OR test manually
./validate-bgp.sh
You should see output showing Nokia and OpenConfig BGP models validating successfully.
Performance Comparison¶
Method | Setup Time | Description |
---|---|---|
make setup |
~30s | Complete automated setup |
setup-submodules-fast.sh ci |
~10s | Ultra-fast for CI |
setup-submodules-fast.sh shallow |
~20s | Fast with shallow clones |
git submodule update --recursive |
~3-5min | Traditional full clone |
Acceleration Achieved
The optimized setup reduces clone time from 5+ minutes to under 30 seconds by using shallow clones and targeted dependency management.
Daily Workflow¶
Basic Commands¶
# Activate environment (always do this first)
source venv/bin/activate
# Navigate to models directory
cd models
# Validate all BGP models
./validate-bgp.sh
# Validate with tree output
./validate-bgp.sh -t
# Quiet mode for scripting
./validate-bgp.sh -q
Vendor-Specific Validation¶
# Nokia BGP models only
./validate-nokia-bgp.sh -t
# OpenConfig BGP models only
./validate-openconfig-bgp.sh -t
# Help for any script
./validate-bgp.sh -h
What's Next?¶
- Validation Workflows: Learn about all validation options
- Models Overview: Understand the model structure
- Scripts Reference: Complete command documentation
Troubleshooting¶
Common Issues¶
Error: pyang not found
Error: nokia-state-router-bgp.yang not found
# Ensure submodules are initialized
git submodule update --init --recursive
# Re-run setup
./scripts/setup-bgp-models.sh
Virtual environment missing
For more troubleshooting help, see Troubleshooting Guide.