Skip to content

Commit d4f5c63

Browse files
committed
Added s390_hkd_revocation_list attribute
Optional attribute in the chain of hkd attributes
1 parent 2818105 commit d4f5c63

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

kiwi/schema/kiwi.rnc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2911,6 +2911,14 @@ div {
29112911
sch:param [ name = "attr" value = "s390_hkd_sign_cert" ]
29122912
sch:param [ name = "types" value = "zipl grub2_s390x_emu" ]
29132913
]
2914+
k.bootloader.s390_hkd_revocation_list.attribute =
2915+
## Specifies the s390 confidental compute host key document (hkd)
2916+
## revocation list (CRL) file.
2917+
attribute s390_hkd_revocation_list { text }
2918+
>> sch:pattern [ id = "s390_hkd_revocation_list" is-a = "bootloader_name_type"
2919+
sch:param [ name = "attr" value = "s390_hkd_revocation_list" ]
2920+
sch:param [ name = "types" value = "zipl grub2_s390x_emu" ]
2921+
]
29142922
k.bootloader.console.attribute =
29152923
## Specifies the bootloader console.
29162924
attribute console { grub_console }
@@ -2972,7 +2980,8 @@ div {
29722980
k.bootloader.s390_hkd_cert.attribute? &
29732981
(
29742982
k.bootloader.s390_hkd_ca_cert.attribute &
2975-
k.bootloader.s390_hkd_sign_cert.attribute
2983+
k.bootloader.s390_hkd_sign_cert.attribute &
2984+
k.bootloader.s390_hkd_revocation_list.attribute?
29762985
)? &
29772986
k.bootloader.console.attribute? &
29782987
k.bootloader.serial_line.attribute? &

kiwi/schema/kiwi.rng

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4381,6 +4381,16 @@ signing key certificate file.</a:documentation>
43814381
<sch:param name="types" value="zipl grub2_s390x_emu"/>
43824382
</sch:pattern>
43834383
</define>
4384+
<define name="k.bootloader.s390_hkd_revocation_list.attribute">
4385+
<attribute name="s390_hkd_revocation_list">
4386+
<a:documentation>Specifies the s390 confidental compute host key document (hkd)
4387+
revocation list (CRL) file.</a:documentation>
4388+
</attribute>
4389+
<sch:pattern id="s390_hkd_revocation_list" is-a="bootloader_name_type">
4390+
<sch:param name="attr" value="s390_hkd_revocation_list"/>
4391+
<sch:param name="types" value="zipl grub2_s390x_emu"/>
4392+
</sch:pattern>
4393+
</define>
43844394
<define name="k.bootloader.console.attribute">
43854395
<attribute name="console">
43864396
<a:documentation>Specifies the bootloader console.</a:documentation>
@@ -4470,6 +4480,9 @@ is useful for full disk encryption images</a:documentation>
44704480
<interleave>
44714481
<ref name="k.bootloader.s390_hkd_ca_cert.attribute"/>
44724482
<ref name="k.bootloader.s390_hkd_sign_cert.attribute"/>
4483+
<optional>
4484+
<ref name="k.bootloader.s390_hkd_revocation_list.attribute"/>
4485+
</optional>
44734486
</interleave>
44744487
</optional>
44754488
<optional>

kiwi/xml_parse.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# kiwi/schema/kiwi_for_generateDS.xsd
1717
#
1818
# Command line:
19-
# /home/ms/Project/kiwi/.tox/unit_py3_11/bin/generateDS.py -f --external-encoding="utf-8" --no-dates --no-warnings -o "kiwi/xml_parse.py" kiwi/schema/kiwi_for_generateDS.xsd
19+
# /home/ms/.cache/pypoetry/virtualenvs/kiwi-Btua-i95-py3.11/bin/generateDS.py -f --external-encoding="utf-8" --no-dates --no-warnings -o "kiwi/xml_parse.py" kiwi/schema/kiwi_for_generateDS.xsd
2020
#
2121
# Current working directory (os.getcwd()):
2222
# kiwi
@@ -5967,13 +5967,14 @@ class bootloader(GeneratedsSuper):
59675967
provide configuration parameters for it"""
59685968
subclass = None
59695969
superclass = None
5970-
def __init__(self, name=None, bls=None, s390_hkd_cert=None, s390_hkd_ca_cert=None, s390_hkd_sign_cert=None, console=None, serial_line=None, timeout=None, timeout_style=None, targettype=None, use_disk_password=None, grub_template=None, bootloadersettings=None):
5970+
def __init__(self, name=None, bls=None, s390_hkd_cert=None, s390_hkd_ca_cert=None, s390_hkd_sign_cert=None, s390_hkd_revocation_list=None, console=None, serial_line=None, timeout=None, timeout_style=None, targettype=None, use_disk_password=None, grub_template=None, bootloadersettings=None):
59715971
self.original_tagname_ = None
59725972
self.name = _cast(None, name)
59735973
self.bls = _cast(bool, bls)
59745974
self.s390_hkd_cert = _cast(None, s390_hkd_cert)
59755975
self.s390_hkd_ca_cert = _cast(None, s390_hkd_ca_cert)
59765976
self.s390_hkd_sign_cert = _cast(None, s390_hkd_sign_cert)
5977+
self.s390_hkd_revocation_list = _cast(None, s390_hkd_revocation_list)
59775978
self.console = _cast(None, console)
59785979
self.serial_line = _cast(None, serial_line)
59795980
self.timeout = _cast(int, timeout)
@@ -6005,6 +6006,8 @@ def get_s390_hkd_ca_cert(self): return self.s390_hkd_ca_cert
60056006
def set_s390_hkd_ca_cert(self, s390_hkd_ca_cert): self.s390_hkd_ca_cert = s390_hkd_ca_cert
60066007
def get_s390_hkd_sign_cert(self): return self.s390_hkd_sign_cert
60076008
def set_s390_hkd_sign_cert(self, s390_hkd_sign_cert): self.s390_hkd_sign_cert = s390_hkd_sign_cert
6009+
def get_s390_hkd_revocation_list(self): return self.s390_hkd_revocation_list
6010+
def set_s390_hkd_revocation_list(self, s390_hkd_revocation_list): self.s390_hkd_revocation_list = s390_hkd_revocation_list
60086011
def get_console(self): return self.console
60096012
def set_console(self, console): self.console = console
60106013
def get_serial_line(self): return self.serial_line
@@ -6070,6 +6073,9 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='
60706073
if self.s390_hkd_sign_cert is not None and 's390_hkd_sign_cert' not in already_processed:
60716074
already_processed.add('s390_hkd_sign_cert')
60726075
outfile.write(' s390_hkd_sign_cert=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.s390_hkd_sign_cert), input_name='s390_hkd_sign_cert')), ))
6076+
if self.s390_hkd_revocation_list is not None and 's390_hkd_revocation_list' not in already_processed:
6077+
already_processed.add('s390_hkd_revocation_list')
6078+
outfile.write(' s390_hkd_revocation_list=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.s390_hkd_revocation_list), input_name='s390_hkd_revocation_list')), ))
60736079
if self.console is not None and 'console' not in already_processed:
60746080
already_processed.add('console')
60756081
outfile.write(' console=%s' % (quote_attrib(self.console), ))
@@ -6132,6 +6138,10 @@ def buildAttributes(self, node, attrs, already_processed):
61326138
if value is not None and 's390_hkd_sign_cert' not in already_processed:
61336139
already_processed.add('s390_hkd_sign_cert')
61346140
self.s390_hkd_sign_cert = value
6141+
value = find_attr_value_('s390_hkd_revocation_list', node)
6142+
if value is not None and 's390_hkd_revocation_list' not in already_processed:
6143+
already_processed.add('s390_hkd_revocation_list')
6144+
self.s390_hkd_revocation_list = value
61356145
value = find_attr_value_('console', node)
61366146
if value is not None and 'console' not in already_processed:
61376147
already_processed.add('console')

0 commit comments

Comments
 (0)