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

libvirt_xml/devices/address: add optional zpci subelement #3975

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smitterl
Copy link
Contributor

@smitterl smitterl commented Aug 20, 2024

On s390x, there can be a zpci subelement which is used to determine properties inside the guest: uid corresponds to the domain and fid corresponds to the slot number.

@smitterl
Copy link
Contributor Author

Tested manually:

>>> from virttest.libvirt_xml.devices import address as a
>>> addr = a.Address.new_from_dict({"type_name": "pci", "domain": "0x0000", "bus":"0x00", "slot":"0x00", "function":"0x0"})
>>> str(addr)
'<address type="pci" domain="0x0000" bus="0x00" slot="0x00" function="0x0" />'
>>> zpci = addr.Zpci.new_from_dict({"uid":"0x01", "fid":"0x0"})
>>> addr.set_zpci_attrs(zpci)
>>> str(addr)
'<address type="pci" domain="0x0000" bus="0x00" slot="0x00" function="0x0"><zpci uid="0x01" fid="0x0" /></address>'

@smitterl smitterl changed the title libvirt_xml/devices/address: add optional zfcp subelement libvirt_xml/devices/address: add optional zpci subelement Aug 20, 2024
On s390x, there can be a zpci subelement which is used to
determine properties inside the guest: uid corresponds to the domain
and fid corresponds to the slot number.

Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
@smitterl
Copy link
Contributor Author

Used in autotest/tp-libvirt#5853

Copy link
Contributor

@chunfuwen chunfuwen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants