-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix show-xml filtering by interface name (issue #735,bsc#954758) #744
Conversation
I'm not entirely happy with the double for loop, it looks messy. I'm open to suggestions if that can be improved. |
Please improve & fix as commented via pm mail :-) |
Thanks for your comments. Hope those commits address all the issues. Awaiting your feedback :). |
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.
Could you please cleanup the (leading) space changes and adjust also the usage message? I'd also prefer to squash it into 1..3 clean & final commits instead of full evolution history adding 2nd loop & removing it again.
client/main.c
Outdated
object_node = xml_node_new("object", parent); | ||
xml_node_add_attr(object_node, "path", object_path); | ||
object_node = xml_node_new("object", NULL); | ||
xml_node_add_attr(object_node, "path", object_path); |
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.
please remove the leading spaces. you may configure .gitconfig to show (and or fix) them, e.g. core.whitespace = fix,indent-with-non-tab,trailing-space
…NI_OBJECTMODEL_NAMESPACE constant
I've added your additional suggestions (usage info and trailing whitespaces), but I did it before squashing the commits. Should I have done those afterwards? |
This looks very good now... There is still a bit odd usage inside of the show-xml, could you adjust it too please? |
I'm not sure how to improve that one, I'm looking at how other subcommands have their usage section and doing the |
Yes, your note should be sufficient to cover --raw case (until we refactor it to apply the filter to --raw too), but we should adjust at least: - "wicked [options] show-xml <ifname|all>\n"
- "\nSupported options:\n"
+ "wicked show-xml [options] [ifname ... |all]\n"
+ "\n"
+ "Supported options:\n" |
I got you, should be done :). Thanks for the feedback! |
Could you please also remove the obsolete variable? :
|
OK, fixed in a separate commit 54a8504c4 |
This PR adds filtering functionality to the show-xml command, with the following behaviour:
wicked show-xml <ifname1> <ifname2>
: show xml only forifname1
andifname2
wicked show-xml all
: show xml for all available network interfaceswicked show-xml
: same as above, show all interfacesThis should address issue #735