-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Support new NUT vocabulary in nutconf
#2294
Labels
augeas
Configuration file parser (reader, writer) multi-tool for scripting, etc.
enhancement
nutconf
NUT configuration library and tool
Milestone
Comments
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 24, 2024
…isting methods [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 25, 2024
… classes to config files [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 25, 2024
…es [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 25, 2024
networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 25, 2024
…on::getFlag() and setFlag() methods [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 25, 2024
…on::getBool() and setBool() method set [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 25, 2024
…on::getBoolInt() and setBoolInt() method set [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 25, 2024
…omatic setBool()/getBool() [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 26, 2024
…ed between NUT 2.6.5 and 2.8.2 [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 26, 2024
…tests [networkupstools#657, networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
This was referenced Apr 26, 2024
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 28, 2024
…o true/false with implementation handling remove() where needed [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 28, 2024
… "flag" not just "bool" or "str" entities [networkupstools#2294] Toss in other GenericUPS_* values Sort alphabetically Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 28, 2024
…ration class [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 28, 2024
…en NUT 2.6.5 and 2.8.2 [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 28, 2024
…rkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 29, 2024
…etworkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 29, 2024
…xplicit call to operator via "if (b == true)" [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 29, 2024
… "may be used uninitialized in this function" warnings [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 29, 2024
…info> before using typeid [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 29, 2024
…ex [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 29, 2024
… override.* expressions [networkupstools#2294] Such possibility makes augtools-1.12.0 upset (fixed since 1.13.0, see hercules-team/augeas#668 for details) Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Apr 29, 2024
…ragmas to hush warnings about macro code [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
May 6, 2024
…uninitialized in this function" warnings [networkupstools#2294, networkupstools#2433] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
May 6, 2024
…ow() if it was not yet set() at all or since last clear() [networkupstools#2294, networkupstools#2433] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
May 6, 2024
…hrow() [networkupstools#2294] Signed-off-by: Jim Klimov <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
augeas
Configuration file parser (reader, writer) multi-tool for scripting, etc.
enhancement
nutconf
NUT configuration library and tool
Follow up from #2290 and #2283 which provided initial integration of
nutconf
related codebase from 2013 into modern NUT of 2024.To complete a milestone in finite time, this effort had to cut some corners - including not updating the list of supported configuration key words which were added since 2013 (approx. NUT v2.6.5).
Probably augeas lenses files (and their difference over time) would help identify the missing keywords. Also a good moment to make sure those know all the needed words :)
UPDATE:
Bookmarking a helpful spell to see each driver option key word in its documentation and source context (remove
&& continue
to see EVERYTHING including keywords covered by the nutconf class):UPDATE:
Notification keywords and obsolete terminology will be addressed shortly.
Note that structured configuration files (with sections) are handled by
GenericConfiguration
descendants and for all/most key words there are getters/setters in the classes, while information is stored in a nested map.Conversely, unstructured key-value(s) configs like
class UpsmonConfiguration : public Serialisable
with variables for configurable items and enums to constrain some of the choices, and relatedclass UpsmonConfigParser : public NutConfigParser
for generic R/W, are handled bycommon/nutconf.cpp
andcommon/nutwriter.cpp
(as serialization of an object likeUpsmonConfiguration::Monitor
into a string). See e.g.common/nutconf.cpp
=>UpsmonConfigParser::onParseDirective
for keyword vocabulary, orcommon/nutconf.cpp
=>UpsmonConfiguration::NotifyTypeFromString()
vs.common/nutwriter.cpp
=>NotifyFlagsStrings.initFlagStrings()
for enum to string (and the other way) conversions.One big wad of changes to address later is in
include/nutconf.hpp
, namelyclass UpsConfiguration
which lists all words that can appear inups.conf
- and this area saw progress over the decade sincenutconf
was initially written. Similarly forUpsdUsersConfiguration
- but not likely much changed there.In many daemon configs, a
debug_min
would be useful.Another wad is
tools/nutconf/nutconf-cli
withnut-scanner
related options (add simulated devices, revise options for SNMP auth, and others). Note that the tool directly useslibnutscan
methods, e.g. does not call the CLI tool as a separate program. Maybe needs refinement to use device names with type, e.g. "nutdev-snmp-1" not "nutdev-1", like the CLI tool does - see #2247.Generally for NUT daemons it can help to compare man pages and/or sample configs between
v2.6.5
tag and current code-base.A script would be helpful to extract keywords expected by C++ (getters/setters) and defined by
ADD_VAR/ADD_FLAG
in driver sources, to either generate a C++ source file (e.g. to#include
into the build) or at least to compare for sanity-checking (but maintain manually to keep API stable).As a point for comparison, augeas lens files are generated during each build by parsing NUT sources for keywords.
The text was updated successfully, but these errors were encountered: