clustershell icon indicating copy to clipboard operation
clustershell copied to clipboard

Add support of node separator(s) to the NodeSet class

Open thiell opened this issue 7 years ago • 0 comments

In 1.8, the NodeSet class does only recognize the "," separator for node/nodeset that also implictly means "union set". We should probably support other separators for convenience, like space, tab and newline, because the current behavior is probably useless:

  >>> str(NodeSet("foo1 foo2"))
  'foo1 foo2'
  >>> len(NodeSet("foo1 foo2"))
  1

Note that Issue #394 added support for multiline argument to nodeset/cluset by modifying the CLI code. If newline support is added to NodeSet, this could simplify the CLI.

Likely a set of separators could be supported per instance (TBD).

thiell avatar Oct 31 '18 04:10 thiell