Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CLI/Nodeset: omit @source: prefix for cluset -s source -L (#563) #570

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/ClusterShell/CLI/Nodeset.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ def command_list(options, xset, group_resolver):
if options.listall:
# useful: sources[0] is always the default or selected source
sources = group_resolver.sources()
# do not print name of default group source unless -s specified
if sources and not options.groupsource:
# do not print the name of the current group source (either the default
# or the one specified by -s)
if sources:
sources[0] = None
else:
sources = [options.groupsource]
Expand Down
2 changes: 1 addition & 1 deletion tests/CLINodesetTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ def test_039_list_all(self):
self._nodeset_t(["-GL"], None,
b"@bar\n@foo\n@moo\n@baz\n@norf\n@qux\n")
self._nodeset_t(["--list-all", "-s", "other"], None,
b"@other:baz\n@other:norf\n@other:qux\n@test:bar\n@test:foo\n@test:moo\n")
b"@baz\n@norf\n@qux\n@test:bar\n@test:foo\n@test:moo\n")
self._nodeset_t(["--list-all", "-G", "-s", "other"], None,
b"@baz\n@norf\n@qux\n@bar\n@foo\n@moo\n") # 'other' source first

Expand Down
Loading