Skip to content

Commit 59def71

Browse files
committed
confd: Add mount constraint for container config
- Add constraint to require either 'source' or 'content' in a container mount
1 parent fa7c3d0 commit 59def71

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

src/confd/yang/confd/infix-containers.yang

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ module infix-containers {
2222
prefix infix-sys;
2323
}
2424

25+
revision 2025-05-14 {
26+
description
27+
"Validation improvement:
28+
- Added constraint to require either 'source' or 'content' in a container mount.";
29+
reference "internal";
30+
}
31+
2532
revision 2024-11-15 {
2633
description "Two major changes:
2734
- Add support for ftp/http/https images with checksum
@@ -392,6 +399,10 @@ module infix-containers {
392399
type boolean;
393400
default true;
394401
}
402+
403+
must "boolean(source) or boolean(content)" {
404+
error-message "A mount must have either 'source' or 'content'.";
405+
}
395406
}
396407

397408
list volume {

src/confd/yang/containers.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# REMEMBER TO UPDATE infix-interfaces ALSO IN confd.inc
33
MODULES=(
44
"[email protected] -e vlan-filtering -e containers"
5-
"infix-containers@2024-11-15.yang"
5+
"infix-containers@2025-05-14.yang"
66
)

0 commit comments

Comments
 (0)