NACM: fix validity error in our default system config
...and prevent it from happening next time.
Change-Id: Ia9bebe3c9142f688898dc0cfa40fffa6add5f273
Fixes: e6ecb9b ("Add NACM rules")
diff --git a/package/czechlight-cfg-fs/czechlight-cfg-fs.mk b/package/czechlight-cfg-fs/czechlight-cfg-fs.mk
index cabfabe..60f4785 100644
--- a/package/czechlight-cfg-fs/czechlight-cfg-fs.mk
+++ b/package/czechlight-cfg-fs/czechlight-cfg-fs.mk
@@ -1,5 +1,5 @@
CZECHLIGHT_CFG_FS_INSTALL_IMAGES = YES
-CZECHLIGHT_CFG_FS_DEPENDENCIES = host-e2fsprogs
+CZECHLIGHT_CFG_FS_DEPENDENCIES = host-e2fsprogs host-libyang netopeer2
CZECHLIGHT_CFG_FS_LOCATION = $(BINARIES_DIR)/cfg.ext4
@@ -14,6 +14,10 @@
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 --strict \
+ $(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
define CZECHLIGHT_CFG_FS_INSTALL_TARGET_CMDS
diff --git a/package/czechlight-cfg-fs/nacm.json b/package/czechlight-cfg-fs/nacm.json
index f3e5fbd..59d413b 100644
--- a/package/czechlight-cfg-fs/nacm.json
+++ b/package/czechlight-cfg-fs/nacm.json
@@ -7,22 +7,22 @@
"rule": [
{
"name": "czechlight-roadm-device",
- "module": "czechlight-roadm-device",
+ "module-name": "czechlight-roadm-device",
"action": "permit"
},
{
"name": "czechlight-inline-amp",
- "module": "czechlight-inline-amp",
+ "module-name": "czechlight-inline-amp",
"action": "permit"
},
{
"name": "czechlight-coherent-add-drop",
- "module": "czechlight-coherent-add-drop",
+ "module-name": "czechlight-coherent-add-drop",
"action": "permit"
},
{
"name": "czechlight-calibration-device",
- "module": "czechlight-calibration-device",
+ "module-name": "czechlight-calibration-device",
"action": "permit"
}
]