Repository navigation
Update the README to match the code - #45
Open
somethingwithproof wants to merge 1 commit into
Open
somethingwithproof wants to merge 1 commit into
somethingwithproof wants to merge 1 commit into
Conversation
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Rewrites
README.mdso that every statement matches the code on the default branch (origin/develop at 7fe6d33), and moves the 1.1 and 1.0 release history from the README toCHANGELOG.md, where the other entries are.Documentation only.
INFOis not changed (see "Decision for the maintainers"). Statements about behaviour that other open changes alter (for example the wmic path setting, the wmic credentials and the script-server paths) describe the default branch as it is today and need a one-line update when those land.Related Issue
None open for this. It touches the same ground as open issue #15 (Windows hosts); the README now states what the code does, without taking a position on that issue.
Motivation and Context
Several README statements were wrong or out of date:
Linux_WMI" in step and to install awmi-client/ openwsman package. The path comes from thepath_wmisetting, and the package is not in the repositories I could check.How Has This Been Tested?
Each README claim was checked against the code or by running a command in a throwaway Cacti (MariaDB 11.8.9, no other plugin installed). The commands in the README were run as written on the final tree.
Cacti versions run (the README says exactly this and nothing more):
cli/plugin_manage.php; tables, column, hooks andplugin_configstatus as expected at each stepplugin_manage.php --install,--enable,--disable,--enable,--uninstall,--install --enable,--disable --uninstall> (Edit)) because its breadcrumb parent does not exist, and the Cacti log gets warningsresolve_navigation_variables(): Argument #1 ($text) must be of type string, null givenThe pages were requested with a logged-in admin through PHP's built-in server, with one device (id 1) added so the Device page has something to show. Nothing was run on Cacti releases other than these four, and nothing on PHP 8.2 or 8.3 locally.
At each step the database was inspected. After install: seven tables, the
host.wmi_accountcolumn, a realm "WMI Management" for the three pages, 11 hooks and the two data input methods. After disable: all of them still present. After uninstall: tables, column, hooks and realm gone; the two data input methods remain. Installing again gives the realm a new id (2 became 3). The result was the same on 1.2.31, 1.2.32 and 1.3.0.Full test suite in the CI order (checkout,
composer installas the workflow does it, the pinned Pest harness for 1.2.x,install_cacti,plugin_manage --install --enableon a bare Cacti, then Pest as a non-root user): 54 passed and 1 warning (the existingPruneFilesTestpermission test) on the 1.2.x branch and on develop; workflow log grep clean.php -lover every production file with php:8.0-cli and php:7.4-cliincludes/linux_wmi.php:41(constructor property promotion).github/workflows/plugin-ci-workflow.yml(php: ['8.2', '8.3', '8.4'],CACTI: 1.2.x)composer.jsonrequire.phpat the 1.2.31 tag, the 1.2.x tip and develop>=8.0,>=8.2,^8.3^\s*function\s+name\s*\(inlib/*.phpandinclude/global_languages.phpat therelease/1.2.0tagauth_augment_roles(), whichsetup.php:286calls only when it existswmi_processesuses the MEMORY engineincludes/database.php:122cactiReturnToclick handler before 1.2.31grepofinclude/layout.jsat the tags 1.2.28 to 1.2.31, the 1.2.x tip and developlayout.jsdefinescactiReturnTo()but binds no click handler). The plugin's buttons carry only the class:wmi_accounts.php:194,wmi_queries.php:211,213php cli/plugin_manage.php --plugin=wmi --install --enableon 1.2.31, 1.2.x and developlib/plugins.php:1566(1.2.x),:1837(develop)host.wmi_accountcolumn, the realm, hooks and two data input methods--installplugin_wmi_upgrade()lib/,plugins.phpandinclude/of Cacti 1.2.x and develop for_upgrade/check_upgradecallers;setup.php:164,:849wmi_prune_files()is reached only from that functionplugin_managesteps above with the database inspected after eachsetup.php:87to:140wmi-client/ openwsman)apt-cacheforwmi-client,wmic,openwsman,wsmancli,winexein Debian 12;apt-get install wmi-clientin Ubuntu 18.04 (amd64) and 20.04 (arm64)path_wmiread by the tool and poller, default/usr/bin/wmic; no settings fieldwmi_tools.php:610,613;includes/functions.php:456,459;grep path_wmi setup.phpwmi_script.phpuses/usr/bin/wmic;script/wmi-script.phpusesplugins/wmi/wmic(not shipped)wmi_script.php:75,script/wmi-script.php:73;find . -iname 'wmic*'outside tests--userand--passwordargumentsincludes/linux_wmi.phpbuild_command()pwshavailableincludes/linux_wmi.php:318to:326(default_transport()looks only atcacti_server_os)powershell.exeon a Windows serverincludes/linux_wmi.php:322;pwshis only the constructor defaultsetup.php:283,284;includes/functions.php:38(display_tabs(): Queries, Authentication)setup.phpwmi_device_template_edit(),wmi_device_edit_pre_bottom(),wmi_config_form(); the Device Template and Device pages load on all four Cacti versionspoller_wmi.php:202,385(wmi_account > 0)setup.php:71,286,291includes/linux_wmi.php:534to:542setup.php:477to:531wmi_enabledon,wmi_processes10 (choices 1 to 10, then 15 to 50),wmi_autocreateonwmi_enabledis never readgrep -rn wmi_enabledover the production filessetup.php:503wmi_autocreatedoes nothingsetup.php:819to:831(the call is commented out)wmi_autopurgeread, not registeredpoller_wmi.php:267; no definition insetup.phpsetup.php:204to:212(poller_id == 1,exec_background);poller_wmi.php:189to:202(device selection); run with no deviceWMI STATSline,stats_wmisettingTime:0.00 Processes:10 Devices:0INSERT INTO wmi_processes ... NOW() - INTERVAL 2 HOUR, thenphp plugins/wmi/poller_wmi.php -Mpoller_wmi.php:57to:104;php plugins/wmi/poller_wmi.php --help; run with no arguments-M,--host-id,--seed,-f,-d; no arguments prints "FATAL: You must specify a Cacti host-id run".-fonly sets a flag passed on to children;debug()(line 147) is never calledhost_wmi_accountsunusedgrepshows it only insetup.php:97(drop) andincludes/database.php:89(create)templates/resource/script_server/exchange_messages.xml:3,8;wmi_script.php:80(WHERE name = ?);grepfor callers ofplugin_wmi_create_dataquery_xmlandplugin_wmi_create_resource_xmlscript_pathis `setup.php:337to:342(mappingpoints atindex.php:wmi_accounts.php:, which is not defined); page request on each versionsh locales/build_gettext.shon a copy of the tree in an Ubuntu 24.04 container withgettextcat: include/cacti_version: No such file or directory, then updates the.pofiles; on macOS, BSDsedalso failsphp tests/bin/validate-manifest.php,php tests/bin/check-i18n-pot.php origin/develop, the Pest command,php tests/bin/patch-coverage.php coverage/clover.xml origin/develop 100from the plugin directorycoverage/present (hence the README note to run it first); the i18n check passes; Pest passes in the CI-order simulation on both refs; the patch coverage check reports "no measured lines changed" for this changetests/.cacti-versionmust read1.2.xordeveloptests/bootstrap-unit.phpversion checkNot run: the GitHub workflow itself, PHP 8.2 and 8.3 locally, Cacti releases other than the four above, a real wmic or Windows host, and
pwsh.Decision for the maintainers
INFOstill sayscompat = 1.1.4andversion = 1.0. Both disagree with the rest of the repository:cacti_sizeof()(inpoller_wmi.php,wmi_tools.phpandincludes/functions.php). I could not find it inlib/functions.php,html.php,html_form.php,html_utility.phporplugins.phpat therelease/1.1.26tag, so a plugin declared for Cacti 1.1.4 would fail there. The functions the code calls all exist at therelease/1.2.0tag, and nothing was run on 1.1.x or on 1.2.0 to 1.2.19 (a trial install through the plugin API on 1.2.19 created the tables and registered the plugin, but I ran nothing further there).CHANGELOG.md, is 1.1.INFOsays 1.0. No git tags or releases exist (gh api repos/Cacti/plugin_wmi/tagsand/releasesare empty), so I did not choose a number.This pull request leaves both fields alone; the README states the versions that were actually run. Declared compatibility and the version are yours to set.
The Warning that the plugin is not fully functional is unchanged. The
wmi_enabled,wmi_autocreateand Edit Account findings above support it.Types of changes
Documentation only.
Checklist: