Expansion of a noderange containing a dynamic group
would erroneously make the dynamic members get promoted
to 'permament' members. Fix this by isolating the
change so that the underlying group config is not changed
just by adding in dynamic nodes.
When a noderange starts with '<' or '>', use the set of all nodes as basis for pagination.
Additionally, provide better feedback to client on noderange parsing issues. Also
implement natural sort in various places after doing it for the pagination.
Noderange syntax now has:
<number : skip first number of nodes matching noderange
>number: provide only number of nodes matching noderange
These operators are intended to be at the end of a noderange. For example:
n1-n8<4>3
That will skip n1-n4 and provide only 3 (n5, n6, n7)
+ operator generates an 'end node' from the nodename to the left
and adding the specified value to the number at the end. This is
as restrictive as the xCAT 2.x perl implementation to ensure best
compatibility.
Enhance noderange to implement:
attribute.name==value (also attribute.name=value) -- strict equality match
attribute.name=~value -- regular expression match
attribute.name!=value -- strict negative match
attribute.name!~value -- negative regular expression match
~nameexpression -- search by node name using regular expression
This also goes a step further by intelligently limiting searches when found to the right of @ or ,-.
On the plugin front, add a one-off description for the 'noderange' attribute.
For the other pieces, make noderange more like any 'extensible' string value
rather than making it special.
Make expansion of groups and rejection of unrecognized elements work.
Additionally, implement dynamic groups. A group may have a 'noderange'
attribute. In this case it is considered to have 'dynamic' members. This
only has meaning in noderange expansion, not in deriving configuration data.
This does not yet add the search by attribute value capabilities and still
doesn't do the pagination or + operators.
Implement [] and - and :. Actually do better than xCAT NodeRange.pm about
multiple numbers in the non-[] sequential range case. Still need to do the things
that requiring wiring up to a config manager (the atom verification as well as
=, =~, and [0] being ~ or / for regex names).