Rename a ZenPack

From Zenoss Wiki
This is the approved revision of this page, as well as being the most recent.
Jump to: navigation, search

Sometimes after you've started work on building a ZenPack you feel as though you gave it as suboptimal name. As Phil Karlton wisely noted, "There are only two hard things in Computer Science: cache invalidation and naming things”. What do you do? Do you rename it? Renaming a ZenPack is one of the last things you'd ever want to do. There are so many possibilities for internal references to its name, and it can be very easy to miss one and introduce bugs.

However, if you haven't released the ZenPack to others and you really feel like it needs a new name, you should at least do the following..

  1. Remove the ZenPack from any systems on which it is installed.
  2. Restart those systems.
  3. Rename the top-level directory.
  4. Rename the internal ZenPacks/*/* directories.
  5. Fix setup.py..
    1. Change NAME.
    2. Change NAMESPACE_PACKAGES
    3. Change PACKAGES
  6. Fix modname/classname in all modeler plugins.
  7. Fix class names in all .zcml files.
  8. Fix imports in all .py files.
  9. Install the ZenPack.
  10. Verify that it still works.