It's been a while since I posted anything here, this will be a short post. Just wanted to give a heads up to anyone using our PyU4V repository. Our developers have been doing some updates to the function repository and recently pushed to Github some nice changes.
Don't worry about any existing scripts utilizing PyU4V in it's previous format, they will continue to work without any changes. Should you wish to update to take advantage of the improvements in Unipshere 8.4 then you can simply switch over to the new rest_univmax2.py file which supports the features of 8.4.
Some of the changes are cosmetic but make the code base for the PyU4V simpler and future proof. We now have a function that builds URLs based on resources. This makes it much simpler to code + we have functions that allow for asynchronous processing. This is an internal function. It builds the URI based on the version and category, the net result is a lot less code that needs to be changed. Pretty nifty!, but I can claim no credit, this is Ciara's handy work once again.
To utilize the new features simply update your scripts to instantiate RestFunctions instead of Rest_Functions, you have the option to provide a version as well, if not supplied it will default to 84. The provision for version will allow us to automatically switch over to new endpoints in future releases.
from PyU4V import RestFunctions
Most functions have been coded and transported across to the new format, any POST (create) functions should be able to take advantage of Async mode if required.
If you are writing functions that may use Async Mode, you can utilize the wait_for_job function to monitor the job list for completion. An example where you might use this is if you are linking a snapshot to new storage group and want to wait for the storage to be complete before masking to a host.
Check out the 84Examples folders, I've updated some of the examples to Utilize the new format also added return code checking and message output for the provisioning example.
As always feel free to contribute with a pull request. We have some customers doing that already and some have forked their own versions of this Github. Great to see the uptake and collaboration, keep it going.