Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow optional string and map types #53

Merged
merged 2 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions package/yast2-dhcp-server.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu May 7 15:31:15 UTC 2020 - Josef Reidinger <jreidinger@suse.com>

- Autoyast schema: Allow optional types for string and map objects
(bsc#1170886)
- 4.3.0

-------------------------------------------------------------------
Sat Apr 4 17:06:50 UTC 2020 - Michal Filka <mfilka@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-dhcp-server.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-dhcp-server
Version: 4.2.3
Version: 4.3.0
Release: 0
Summary: YaST2 - DHCP Server Configuration
Group: System/YaST
Expand Down
60 changes: 38 additions & 22 deletions src/autoyast-rnc/dhcp-server.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ default namespace = "http://www.suse.com/1.0/yast2ns"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace config = "http://www.suse.com/1.0/configns"

include "common.rnc"

dhcp-server = element dhcp-server {
allowed_interfaces? &
element chroot { "1" | "0" }? &
element start_service { "1" | "0" }? &
element use_ldap { "1" | "0" }? &
element other_options { text } &
dhcp-server-settings?
MAP,
(
allowed_interfaces? &
element chroot { STRING_ATTR, ("1" | "0") }? &
element start_service { STRING_ATTR, ("1" | "0") }? &
element use_ldap { STRING_ATTR, ("1" | "0") }? &
element other_options { STRING } &
dhcp-server-settings?
)
}

allowed_interfaces =
Expand All @@ -18,23 +22,26 @@ allowed_interfaces =
allowed_interface*
}

allowed_interface = element allowed_interface { text }
allowed_interface = element allowed_interface { STRING }

dhcp-server-settings = element settings {
LIST,
dhcp-server-settings_entry*
}

dhcp-server-settings_entry = element settings_entry {
settings_entry_children? &
settings_entry_directives? &
MAP,
(
settings_entry_children? &
settings_entry_directives? &


element id { text }? &
options? &
element parent_id { text }? &
element parent_type { text }? &
element type { text }?
element id { STRING }? &
options? &
element parent_id { STRING }? &
element parent_type { STRING }? &
element type { STRING }?
)
}

settings_entry_children = element children {
Expand All @@ -43,8 +50,11 @@ settings_entry_children = element children {
}

settings_entry_child = element child {
element id { text }? &
element type { text }?
MAP,
(
element id { STRING }? &
element type { STRING }?
)
}

settings_entry_directives = element directives {
Expand All @@ -53,9 +63,12 @@ settings_entry_directives = element directives {
}

settings_entry_directives_listentry = element listentry {
element key { text }? &
element type { text }? &
element value { text }?
MAP,
(
element key { STRING }? &
element type { STRING }? &
element value { STRING }?
)
}

options = element options {
Expand All @@ -64,7 +77,10 @@ options = element options {
}

option = element option {
element key { text }? &
element type { text }? &
element value { text }?
MAP,
(
element key { STRING }? &
element type { STRING }? &
element value { STRING }?
)
}