0 Replies Latest reply on May 12, 2017 5:48 AM by Michael Halpin

    Thoughts Wanted On Refactoring the PowerOrion PowerShell Module

    Michael Halpin

      Hi Folks.


      Since the (unofficial) PowerOrion module I worked on a few years ago has gone a bit stale, I've decided to invest some time in revamping the existing functionality, and then expanding on it.


      Some of my thoughts at present include:

      • Publishing and updating it separately from the main Orion SDK
      • Breaking cmdlets out into individual files. This should make it easier to scale, and should also simplify the next point
      • Adding Unit Tests.
      • Increasing performance by rewriting cmdlets where possible to use native bulk update functionality.
      • Extending support for other use cases.
      • Publishing to the PowerShell gallery, to simplify installation of the module  (such as the IPAM functionality)


      One of the biggest drivers for me however, is the unit testing. By writing tests first for each cmdlet, it will be possible ensure that the cmdlets work as designed, and changes to the code later won't break anything. 


      I've set up a new repo for the module over on Github. The plan at present is to refactor the old code first, and write the unit tests for each functionality, just to come up to parity with the existing code (fixing bugs along the way!). Then the module will be published to the gallery. Going forward then there will be a good framework in place for newer functionality.https://github.com/solarwinds/PowerOrion


      What I would like to ask of the Thwack community is for feedback on the above, but also, what cmdlets would you like to see added? Perhaps you have a short script that can be converted to a function, to allow code reuse? Or did you find bugs in the existing module that I might have missed?  I've started tracking the work to be done on the issues page, so if there is anything enhancements/bugs etc please either add an issue over on Github, or in the comments below.