-
Notifications
You must be signed in to change notification settings - Fork 242
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
nodedev_xml: extend MdevXML with attr elements #3723
nodedev_xml: extend MdevXML with attr elements #3723
Conversation
df351f8
to
07c94cf
Compare
07c94cf
to
e8cfdaa
Compare
Tested via autotest/tp-libvirt#5040 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@chloerh Could you help review it as you also have many experience on this? |
virttest/libvirt_xml/nodedev_xml.py
Outdated
return newone | ||
|
||
|
||
class AttrXML(base.LibvirtXMLBase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the xml of <attr>
, seems no need to define this class, we could simply define the accessor with 'has_subclass = False'
and with shorter marshal functions, if <attr>
doesn't have sub-element. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like this:
accessors.XMLElementList('vcpupins', self, parent_xpath='/',
marshal_from=self.marshal_from_vcpupins,
marshal_to=self.marshal_to_vcpupins)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the suggestion. It works well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking my suggestion, btw there's inspekt issue needs to be resovle.
e8cfdaa
to
2daf499
Compare
Add support for attribute elements of the mediated device capability xml, e.g.: ``` <attr name='assign_adapter' value='3'/> <attr name='assign_domain' value='43'/> ``` Signed-off-by: Sebastian Mitterle <[email protected]>
2daf499
to
67c76ba
Compare
Add support for attribute elements of the mediated device capability xml, e.g.: