Plugin Infrastructure: How to implement plugin upgrades?

Oliver Hitz <[email protected]>
Newsgroups gmane.network.cacti.user
Message-ID <[email protected]>
Hi all,

I am working on a custom plugin for Cacti. When I upgrade the plugin
files on my installation (including a change of the version number),
Cacti still displays the old version, even though the new files are
being used (apparently that information is pulled out of the
plugin_config table).

How should I go about implementing upgrades in my plugin? The example
plugin code (plgexample) features a plugin_plgexample_upgrade()
function, but as far as I have seen, Cacti never calls that function.

For now, the only way to do upgrades seems to be Uninstall & Install,
but since I create new database tables with
api_plugin_db_table_create(), this procedure will result in losing all
data every time the plugin is upgraded.

I am using a stock Cacti 0.8.8a during my development.

Any ideas?

Best regards

Oliver

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
cacti-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cacti-user
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAk/9QJUACgkQ4hxFYtsxPoh/qgCfbjuBrZwXk1/9O8EhR/ah09cg
BLcAoNwhmkqajQOpCQl77ktX+Mt/+gwL
=o2xj
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.