virt-manager/virtinst/domain/keywrap.py
Athina Plaskasoviti 9afe51a0f8 cli: Add --keywrap cipher[0-9]*.name=aes|des, cipher[0-9]*.state=on|off
XML Mapping:

<domain>
...
  <keywrap>
    <cipher name="X" state="X"/>
  </keywrap>
...
</domain>

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
2019-07-23 16:59:32 -04:00

20 lines
404 B
Python

from ..xmlbuilder import XMLBuilder, XMLProperty, XMLChildProperty
class _KeyWrap(XMLBuilder):
XML_NAME = "cipher"
_XML_PROP_ORDER = ["name", "state"]
name = XMLProperty("./@name")
state = XMLProperty("./@state", is_onoff=True)
class DomainKeyWrap(XMLBuilder):
"""
Class for generating <keywrap> XML
"""
XML_NAME = "keywrap"
cipher = XMLChildProperty(_KeyWrap)