czechlight-cfg-fs: replace NACM restore service with a migration

Currently we reinitialize ietf-netconf-acm module after each boot by
importing a set of rules. This means that after each boot the NACM
configuration was overwritten with "our" configuration.
This is not what we want. Admin of our box might want to adjust the
NACM rules as he see fit.

Therefore it makes sense to create a migration that sets the default
NACM rules by us and other people can modify them.
When migrating to this OS version (config version 4) we overwrite any
existing NACM rules for the last time as a part of the migration.
Starting from this version users are free to adjust the NACM rules
as they see fit. These rules *will not* be reset at boot time anymore.

We scanned the git and gerrit history for the reason why NACM rules
were not moved to one of the first migrations but we found nothing on
that. So this is probably just one of the skeletons in the cupboard that
is being removed with this commit.

Change-Id: I084d6eb81fc340c09abc2edf2995ff40b219e807
diff --git a/doc/architecture.md b/doc/architecture.md
index c38cdfa..4d90a2f 100644
--- a/doc/architecture.md
+++ b/doc/architecture.md
@@ -34,7 +34,6 @@
 - system configuration is restored from the persistent location in `/cfg` via [`cfg-restore-sysrepo.service`](../package/czechlight-cfg-fs/cfg-restore-sysrepo.service),
 - migrations to system configuration are applied via [`czechlight-migrate.service`](../package/czechlight-cfg-fs/czechlight-migrate.service),
 - configuration of the Netopeer server gets re-checked via `netopeer2-setup.service` (once again in our Buildroot patches); this is needed especially during the first boot with no previous configuration to restore,
-- configuration of NACM is applied via [`nacm-restore.service`](../package/czechlight-cfg-fs/nacm-restore.service),
 - finally, any daemons that use sysrepo are started.
 
 We are also [using a `tmpfs` mount at `/run/sysrepo`](../package/reset-sysrepo/run-sysrepo.mount) that [gets wiped out whenever a sysrepo service fails](../package/reset-sysrepo/reset-sysrepo.mk).
diff --git a/package/cla-sysrepo/cla-appliance.service.in b/package/cla-sysrepo/cla-appliance.service.in
index b01a7a1..15bd3ae 100644
--- a/package/cla-sysrepo/cla-appliance.service.in
+++ b/package/cla-sysrepo/cla-appliance.service.in
@@ -1,9 +1,9 @@
 [Unit]
 Description=CzechLight __MODEL__ driver
-After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service
 Before=rauc-mark-good.service velia-hardware-g1.service velia-hardware-g2.service
 PartOf=netopeer2.service
-Requires=cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+Requires=cfg-restore-sysrepo.service czechlight-migrate.service
 StartLimitIntervalSec=0
 ConditionKernelCommandLine=|czechlight=__MODEL__
 ConditionKernelCommandLine=|czechlight=__MODEL__-g2
diff --git a/package/czechlight-cfg-fs/czechlight-cfg-fs.mk b/package/czechlight-cfg-fs/czechlight-cfg-fs.mk
index e816275..aebcf4b 100644
--- a/package/czechlight-cfg-fs/czechlight-cfg-fs.mk
+++ b/package/czechlight-cfg-fs/czechlight-cfg-fs.mk
@@ -14,16 +14,11 @@
 
 define CZECHLIGHT_CFG_FS_BUILD_CMDS
 	$(TARGET_CC) $(CZECHLIGHT_CFG_FS_PKGDIR)/czechlight-random-seed.c -o $(@D)/czechlight-random-seed
-
-	$(HOST_DIR)/usr/bin/yanglint -t config \
-		$(TARGET_DIR)/usr/share/yang/modules/netopeer2/ietf-netconf-acm@2018-02-14.yang \
-		$(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/czechlight-cfg-fs/nacm.json
 endef
 
 CZECHLIGHT_CFG_FS_SYSTEMD_FOR_MULTIUSER = \
 	czechlight-install-yang.service \
-	czechlight-migrate.service \
-	nacm-restore.service
+	czechlight-migrate.service
 
 $(ifeq ($(CZECHLIGHT_CFG_FS_PERSIST_SYSREPO),y))
 	CZECHLIGHT_CFG_FS_SYSTEMD_FOR_MULTIUSER += \
@@ -47,9 +42,6 @@
 		$(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/czechlight-cfg-fs/impl-cfg-save-sysrepo \
 		$(@D)/czechlight-random-seed
 
-	$(INSTALL) -D -m 0644 -t $(TARGET_DIR)/usr/share/yang-data/ \
-		$(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/czechlight-cfg-fs/nacm.json
-
 	$(INSTALL) -D -m 0755 -t $(TARGET_DIR)/usr/libexec/czechlight-cfg-fs \
 		$(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/czechlight-cfg-fs/czechlight-install-yang.sh \
 		$(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/czechlight-cfg-fs/czechlight-migrate.sh \
diff --git a/package/czechlight-cfg-fs/czechlight-migration-list.sh b/package/czechlight-cfg-fs/czechlight-migration-list.sh
index 6754752..7f8517c 100644
--- a/package/czechlight-cfg-fs/czechlight-migration-list.sh
+++ b/package/czechlight-cfg-fs/czechlight-migration-list.sh
@@ -2,4 +2,5 @@
     '0001_initial-data.sh'
     '0002_default_startup_configuration_for_ietf-interfaces.sh'
     '0003_shelve_alarms.sh'
+    '0004_nacm.sh'
 )
diff --git a/package/czechlight-cfg-fs/nacm.json b/package/czechlight-cfg-fs/migrations/0004_nacm.json
similarity index 100%
rename from package/czechlight-cfg-fs/nacm.json
rename to package/czechlight-cfg-fs/migrations/0004_nacm.json
diff --git a/package/czechlight-cfg-fs/migrations/0004_nacm.sh b/package/czechlight-cfg-fs/migrations/0004_nacm.sh
new file mode 100644
index 0000000..3d7a899
--- /dev/null
+++ b/package/czechlight-cfg-fs/migrations/0004_nacm.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# Import CzechLight-specific NACM rules for DWDM modules
+# ------------------------------------------------------
+# Before this we restored these NACM rules from our "factory-default" on every boot, overwriting whatever was in the ietf-netconf-acm module.
+# Since config v4, the users are free to modify NACM rules as they wish.
+
+sysrepocfg -d startup -m ietf-netconf-acm -f json --import="${MIGRATIONS_DIRECTORY}/0004_nacm.json"
diff --git a/package/czechlight-cfg-fs/nacm-restore.service b/package/czechlight-cfg-fs/nacm-restore.service
deleted file mode 100644
index 4f5e5b9..0000000
--- a/package/czechlight-cfg-fs/nacm-restore.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Restore NACM rules
-After=netopeer2-install-yang.service czechlight-migrate.service cfg.mount
-Requires=netopeer2-install-yang.service czechlight-migrate.service cfg.mount
-Before=netopeer2-setup.service netopeer2.service sysrepo-persistent-cfg.service
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=/bin/sysrepocfg -d startup -m ietf-netconf-acm -f json --import=/usr/share/yang-data/nacm.json
-ExecStart=/bin/sysrepocfg -C startup
-Group=sysrepo
-
-[Install]
-WantedBy=multi-user.target
diff --git a/package/reset-sysrepo/reset-sysrepo.mk b/package/reset-sysrepo/reset-sysrepo.mk
index 2fbd9ec..9aecbd5 100644
--- a/package/reset-sysrepo/reset-sysrepo.mk
+++ b/package/reset-sysrepo/reset-sysrepo.mk
@@ -24,7 +24,6 @@
 		sysrepo-ietf-alarms.service \
 		sysrepo-persistent-cfg.service \
 		sysrepo-plugind.service \
-		nacm-restore.service \
 		velia-firewall.service \
 		velia-health.service \
 		velia-system.service \
diff --git a/package/rousette/rousette.service b/package/rousette/rousette.service
index ba9efbb..b149d6c 100644
--- a/package/rousette/rousette.service
+++ b/package/rousette/rousette.service
@@ -1,8 +1,8 @@
 [Unit]
 Description=RESTCONFish server
-After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service
 PartOf=netopeer2.service
-Requires=cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+Requires=cfg-restore-sysrepo.service czechlight-migrate.service
 
 [Service]
 Type=simple
diff --git a/package/sysrepo-ietf-alarms/sysrepo-ietf-alarms.service b/package/sysrepo-ietf-alarms/sysrepo-ietf-alarms.service
index 0bb5884..27e2359 100644
--- a/package/sysrepo-ietf-alarms/sysrepo-ietf-alarms.service
+++ b/package/sysrepo-ietf-alarms/sysrepo-ietf-alarms.service
@@ -1,9 +1,9 @@
 [Unit]
 Description=IETF-alarms management via sysrepo
-After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service
 Before=rauc-mark-good.service
 PartOf=netopeer2.service
-Requires=cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+Requires=cfg-restore-sysrepo.service czechlight-migrate.service
 ConditionKernelCommandLine=czechlight
 
 [Service]
diff --git a/package/velia/velia-firewall.service b/package/velia/velia-firewall.service
index e5dd1d6..3fc8839 100644
--- a/package/velia/velia-firewall.service
+++ b/package/velia/velia-firewall.service
@@ -1,9 +1,9 @@
 [Unit]
 Description=Firewall management via sysrepo
-After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service
 Before=rauc-mark-good.service
 PartOf=netopeer2.service
-Requires=cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+Requires=cfg-restore-sysrepo.service czechlight-migrate.service
 ConditionKernelCommandLine=czechlight
 
 [Service]
diff --git a/package/velia/velia-hardware-g1.service b/package/velia/velia-hardware-g1.service
index cb0cd30..0efa671 100644
--- a/package/velia/velia-hardware-g1.service
+++ b/package/velia/velia-hardware-g1.service
@@ -1,9 +1,9 @@
 [Unit]
 Description=Tracking hardware metrics
-After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service
 Before=rauc-mark-good.service
 PartOf=netopeer2.service
-Requires=cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+Requires=cfg-restore-sysrepo.service czechlight-migrate.service
 ConditionKernelCommandLine=|czechlight=sdn-inline
 ConditionKernelCommandLine=|czechlight=sdn-roadm-add-drop
 ConditionKernelCommandLine=|czechlight=sdn-roadm-coherent-a-d
diff --git a/package/velia/velia-hardware-g2.service b/package/velia/velia-hardware-g2.service
index 8a58eab..1186979 100644
--- a/package/velia/velia-hardware-g2.service
+++ b/package/velia/velia-hardware-g2.service
@@ -1,9 +1,9 @@
 [Unit]
 Description=Tracking hardware metrics
-After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service
 Before=rauc-mark-good.service
 PartOf=netopeer2.service
-Requires=cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+Requires=cfg-restore-sysrepo.service czechlight-migrate.service
 ConditionKernelCommandLine=|czechlight=sdn-inline-g2
 ConditionKernelCommandLine=|czechlight=sdn-roadm-add-drop-g2
 ConditionKernelCommandLine=|czechlight=sdn-roadm-coherent-a-d-g2
diff --git a/package/velia/velia-health.service b/package/velia/velia-health.service
index d755099..f2cd48e 100644
--- a/package/velia/velia-health.service
+++ b/package/velia/velia-health.service
@@ -1,7 +1,7 @@
 [Unit]
 Description=Health tracking of the whole system
-Requires=multi-user.target cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service sysrepo-ietf-alarms.service
-After=multi-user.target cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service sysrepo-ietf-alarms.service
+Requires=multi-user.target cfg-restore-sysrepo.service czechlight-migrate.service sysrepo-ietf-alarms.service
+After=multi-user.target cfg-restore-sysrepo.service czechlight-migrate.service sysrepo-ietf-alarms.service
 ConditionKernelCommandLine=czechlight
 
 [Service]
diff --git a/package/velia/velia-system.service b/package/velia/velia-system.service
index 113be5c..2fd6a7e 100644
--- a/package/velia/velia-system.service
+++ b/package/velia/velia-system.service
@@ -1,9 +1,9 @@
 [Unit]
 Description=System management via sysrepo
-After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+After=syslog.target network.target cfg-restore-sysrepo.service czechlight-migrate.service
 Before=rauc-mark-good.service
 PartOf=netopeer2.service
-Requires=cfg-restore-sysrepo.service czechlight-migrate.service nacm-restore.service
+Requires=cfg-restore-sysrepo.service czechlight-migrate.service
 ConditionKernelCommandLine=czechlight
 
 [Service]
diff --git a/tests/czechlight-cfg-fs/data/v0_sdn-inline_empty/expected.json b/tests/czechlight-cfg-fs/data/v0_sdn-inline_empty/expected.json
index 59f7990..e3b8174 100644
--- a/tests/czechlight-cfg-fs/data/v0_sdn-inline_empty/expected.json
+++ b/tests/czechlight-cfg-fs/data/v0_sdn-inline_empty/expected.json
@@ -56,5 +56,35 @@
         "type": "iana-if-type:ethernetCsmacd"
       }
     ]
+  },
+  "ietf-netconf-acm:nacm": {
+    "rule-list": [
+      {
+        "name": "Allow DWDM control to the optics group",
+        "group": ["optics"],
+        "rule": [
+          {
+            "name": "czechlight-roadm-device",
+            "module-name": "czechlight-roadm-device",
+            "action": "permit"
+          },
+          {
+            "name": "czechlight-inline-amp",
+            "module-name": "czechlight-inline-amp",
+            "action": "permit"
+          },
+          {
+            "name": "czechlight-coherent-add-drop",
+            "module-name": "czechlight-coherent-add-drop",
+            "action": "permit"
+          },
+          {
+            "name": "czechlight-calibration-device",
+            "module-name": "czechlight-calibration-device",
+            "action": "permit"
+          }
+        ]
+      }
+    ]
   }
 }
diff --git a/tests/czechlight-cfg-fs/data/v0_sdn-roadm-line_empty/expected.json b/tests/czechlight-cfg-fs/data/v0_sdn-roadm-line_empty/expected.json
index edc8766..6ccd852 100644
--- a/tests/czechlight-cfg-fs/data/v0_sdn-roadm-line_empty/expected.json
+++ b/tests/czechlight-cfg-fs/data/v0_sdn-roadm-line_empty/expected.json
@@ -781,5 +781,35 @@
       "channel": "C-band",
       "description": "Whole-band overview"
     }
-  ]
+  ],
+  "ietf-netconf-acm:nacm": {
+    "rule-list": [
+      {
+        "name": "Allow DWDM control to the optics group",
+        "group": ["optics"],
+        "rule": [
+          {
+            "name": "czechlight-roadm-device",
+            "module-name": "czechlight-roadm-device",
+            "action": "permit"
+          },
+          {
+            "name": "czechlight-inline-amp",
+            "module-name": "czechlight-inline-amp",
+            "action": "permit"
+          },
+          {
+            "name": "czechlight-coherent-add-drop",
+            "module-name": "czechlight-coherent-add-drop",
+            "action": "permit"
+          },
+          {
+            "name": "czechlight-calibration-device",
+            "module-name": "czechlight-calibration-device",
+            "action": "permit"
+          }
+        ]
+      }
+    ]
+  }
 }
diff --git a/tests/czechlight-cfg-fs/data/v0_sdn-roadm-line_with_altered_initial_data/expected.json b/tests/czechlight-cfg-fs/data/v0_sdn-roadm-line_with_altered_initial_data/expected.json
index edc8766..def9bac 100644
--- a/tests/czechlight-cfg-fs/data/v0_sdn-roadm-line_with_altered_initial_data/expected.json
+++ b/tests/czechlight-cfg-fs/data/v0_sdn-roadm-line_with_altered_initial_data/expected.json
@@ -781,5 +781,35 @@
       "channel": "C-band",
       "description": "Whole-band overview"
     }
-  ]
+  ],
+  "ietf-netconf-acm:nacm": {
+      "rule-list": [
+          {
+              "name": "Allow DWDM control to the optics group",
+              "group": ["optics"],
+              "rule": [
+                  {
+                      "name": "czechlight-roadm-device",
+                      "module-name": "czechlight-roadm-device",
+                      "action": "permit"
+                  },
+                  {
+                      "name": "czechlight-inline-amp",
+                      "module-name": "czechlight-inline-amp",
+                      "action": "permit"
+                  },
+                  {
+                      "name": "czechlight-coherent-add-drop",
+                      "module-name": "czechlight-coherent-add-drop",
+                      "action": "permit"
+                  },
+                  {
+                      "name": "czechlight-calibration-device",
+                      "module-name": "czechlight-calibration-device",
+                      "action": "permit"
+                  }
+              ]
+          }
+      ]
+  }
 }
diff --git a/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/cmdline b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/cmdline
new file mode 100644
index 0000000..6b1d906
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/cmdline
@@ -0,0 +1 @@
+czechlight=sdn-roadm-line
diff --git a/package/czechlight-cfg-fs/nacm.json b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/expected.json
similarity index 100%
copy from package/czechlight-cfg-fs/nacm.json
copy to tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/expected.json
diff --git a/package/czechlight-cfg-fs/nacm.json b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/startup.json
similarity index 100%
copy from package/czechlight-cfg-fs/nacm.json
copy to tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/startup.json
diff --git a/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/version b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/version
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/version
@@ -0,0 +1 @@
+3
diff --git a/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/xpath b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/xpath
new file mode 100644
index 0000000..8eca9fa
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_default_nacm/xpath
@@ -0,0 +1 @@
+/ietf-netconf-acm:nacm
diff --git a/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/cmdline b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/cmdline
new file mode 100644
index 0000000..6b1d906
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/cmdline
@@ -0,0 +1 @@
+czechlight=sdn-roadm-line
diff --git a/package/czechlight-cfg-fs/nacm.json b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/expected.json
similarity index 100%
copy from package/czechlight-cfg-fs/nacm.json
copy to tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/expected.json
diff --git a/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/startup.json b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/startup.json
new file mode 100644
index 0000000..a56c909
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/startup.json
@@ -0,0 +1,47 @@
+{
+    "ietf-netconf-acm:nacm": {
+        "rule-list": [
+            {
+                "name": "Some rule list",
+                "group": ["optics"],
+                "rule": []
+            },
+            {
+                "name": "Another rule list",
+                "group": ["optics"],
+                "rule": []
+            },
+            {
+                "name": "Allow DWDM control to the optics group",
+                "group": ["optics"],
+                "rule": [
+                    {
+                        "name": "czechlight-roadm-device",
+                        "module-name": "czechlight-roadm-device",
+                        "action": "permit"
+                    },
+                    {
+                        "name": "czechlight-inline-amp",
+                        "module-name": "czechlight-inline-amp",
+                        "action": "permit"
+                    },
+                    {
+                        "name": "czechlight-coherent-add-drop",
+                        "module-name": "czechlight-coherent-add-drop",
+                        "action": "permit"
+                    },
+                    {
+                        "name": "czechlight-calibration-device",
+                        "module-name": "czechlight-calibration-device",
+                        "action": "permit"
+                    }
+                ]
+            },
+            {
+                "name": "Yet another rule list (YARL)",
+                "group": ["optics"],
+                "rule": []
+            }
+        ]
+    }
+}
diff --git a/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/version b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/version
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/version
@@ -0,0 +1 @@
+3
diff --git a/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/xpath b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/xpath
new file mode 100644
index 0000000..8eca9fa
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_multiple_nacm_rules/xpath
@@ -0,0 +1 @@
+/ietf-netconf-acm:nacm
diff --git a/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/cmdline b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/cmdline
new file mode 100644
index 0000000..6b1d906
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/cmdline
@@ -0,0 +1 @@
+czechlight=sdn-roadm-line
diff --git a/package/czechlight-cfg-fs/nacm.json b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/expected.json
similarity index 100%
copy from package/czechlight-cfg-fs/nacm.json
copy to tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/expected.json
diff --git a/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/startup.json b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/startup.json
new file mode 100644
index 0000000..2c63c08
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/startup.json
@@ -0,0 +1,2 @@
+{
+}
diff --git a/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/version b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/version
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/version
@@ -0,0 +1 @@
+3
diff --git a/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/xpath b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/xpath
new file mode 100644
index 0000000..8eca9fa
--- /dev/null
+++ b/tests/czechlight-cfg-fs/data/v3_sdn-roadm-line_no_nacm/xpath
@@ -0,0 +1 @@
+/ietf-netconf-acm:nacm