blob: 8b81ccbf7564faab3eaf6df4550ca1f46119a592 [file] [log] [blame]
Tomáš Pecka04eb7372022-06-07 08:03:04 +02001#!/bin/bash
2
3# Load initial data
4# -----------------
5# These data are imported into the sysrepo's startup datastore only once. This happens either when the box is restored to
6# its factory settings (the box is new and boots for the first time or someone deletes the startup.json backup in /cfg)
7# or when the box is upgraded from the state before the migrations were introduced (versions released before July 2022).
8#
9# It's OK for user to remove these settings from sysrepo startup DS.
10# However, the data will NEVER get restored by us (unless somebody deletes /cfg/startup.json, see above).
11
12case "${CZECHLIGHT}" in
13 sdn-roadm-line*)
14 sysrepocfg --datastore=startup --format=json --module=czechlight-roadm-device --import="${CLA_YANG}/sdn-roadm-line.json"
15 ;;
16 sdn-roadm-add-drop*)
17 ;& # fallthrough
18 sdn-roadm-hires-add-drop*)
19 sysrepocfg --datastore=startup --format=json --module=czechlight-roadm-device --import="${CLA_YANG}/sdn-roadm-add-drop.json"
20 ;;
21 sdn-roadm-coherent-a-d*)
22 sysrepocfg --datastore=startup --format=json --module=czechlight-coherent-add-drop --import="${CLA_YANG}/sdn-roadm-coherent-a-d.json"
23 ;;
24 sdn-inline*)
25 sysrepocfg --datastore=startup --format=json --module=czechlight-inline-amp --import="${CLA_YANG}/sdn-inline.json"
26 ;;
27 calibration-box)
28 sysrepocfg --datastore=startup --format=json --module=czechlight-calibration-device --import="${CLA_YANG}/calibration-box.json"
29 ;;
30esac