Establish a config file for certain configuration parameters that
control service startup and things that are best managed via out
of band configuration file and easiest to do with a restart. For
now, implement control of http service binding.
From Lucio Seki
Currently, an empty collection has no 'item' entry, a singleton value, or
a list depending on whether it has 0, 1, or more children. Modify this so
that at least 1 and more children are consistent.
If stdout is not a tty, do not import readline. import
readline by itself can cause terminal control characters
to appear in the stdout. Avoid this by only importing if
there seems to be a sign it is connected to a terminal.
Add a draft event log interface along with an ipmi implementation.
This requires current git master of pyghmi. Release of pyghmi will
be done before this commit lands in a confluent release.
Present 'inventory/hardware/all/' hierarchy. Currently
only ipmi and 'all/all' works. The data structure may be amended in
the very near future as well.
If on a remote socket, socket.error could be thrown. A mistake was
made where the Python2.x behavior of ',' on an except clause without
parenthesis misinterpreted socket.error as a variable name to store
instance of socket.gaierror. Put Parentheses in to declare the desired
behavior.
While the native perl threading object will do join() on exit,
eventlet's variant does not. Fix this by manually hooking join() in
via atexit. Since this is an eventlet specific thing, it makes sense
to work the issue in code that patches in eventlet rather than in pyghmi
itself.
There was a 5 second timeout to establish basic connectivity, but
was mistakenly extended beyond that. Re-establish default timeout
behavior after connectivity established.
In changing to do multi-node, some flow was altered. Where it would
formerly cease execution, the changes made it continue. Add return
statements to match everywhere that return statements were effectively
removed.
Provide specific feedback to client when possible. When not possible,
at least get condition into the correct trace log and notify client of
condition.
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 ,-.
Be more sparing with 'ok' and '()' in output. Many of the sensors
have no particular meaning if they are 'ok'.
For a sensor witohut a value, the states are no longer surrounded by
() to reflect that they are more first class rather than describing
a primary value.
nodesensors is not roughly at par with rvitals.
This means more complete handling and recognizing
some of the rvitals shortcuts as well as some mistakes
in the draft. Still lacking are interval/repeat queries.
The socket API was not wrapping enough output. Also fix 'databynode' reporting
for noderange based commands and have the 'sensor not found' event fall in that
realm.
Before there was some awkward ambiguity between top level
key names and node names. For example a node named 'error'
would be tricky. Address that by allocating a 'databynode'
top level container to clarify the namespace of keys is
nodenames specifically. Use this to simplify code that
tried to workaround the ambiguity.
If the json dumper sees utf-8 encoded strings that
it wants to join with other strings, it will not work.
Instead make all the data fully unicode to make json
dumper happy. Then force it to encode to utf-8 to make
python's IO happy.