Move to yaml.v3 and mergo. Refactor config parsing into a package. Refactor SSH connections into a package. Create default YAML directory, and update docs
This commit is contained in:
@ -26,8 +26,6 @@ make build
|
||||
|
||||
**Main config** (`config.yaml`):
|
||||
```yaml
|
||||
!include device-types.yaml
|
||||
|
||||
devices:
|
||||
asw100:
|
||||
user: netops
|
||||
@ -37,7 +35,7 @@ make build
|
||||
type: srlinux
|
||||
```
|
||||
|
||||
**Device types** (`device-types.yaml`):
|
||||
**Device types** (`00-device-types.yaml`):
|
||||
```yaml
|
||||
types:
|
||||
srlinux:
|
||||
@ -51,10 +49,10 @@ make build
|
||||
|
||||
```bash
|
||||
# Backup all devices
|
||||
ipng-router-backup --config config.yaml --output-dir /backup
|
||||
ipng-router-backup --yaml *.yaml --output-dir /backup
|
||||
|
||||
# Backup specific devices
|
||||
ipng-router-backup --config config.yaml --host asw100 --output-dir /backup
|
||||
ipng-router-backup --yaml *.yaml --host asw100 --output-dir /backup
|
||||
```
|
||||
|
||||
3. **Check output**:
|
||||
|
Reference in New Issue
Block a user