Recently, I have performed testing to get our current set of Powershell scripts working with REST API. I would like to share some of my results, in the spirit of trying to improve the product and ease our transition from ONTAPI to REST API
I tested a number of existing Powershell scripts which my team has developed over the years. I tested with PSTK v9.13.1.2306 and OnTAP v9.10.1p12
On the positive side, the very basic functionality is there. You can "drop in" the new PSTK package into Windows, use the same cmdlets with REST and ONTAPI, and they work at a basic level. PSTK hides the complexity of the underlying calls and provides a consistent set of cmdlets.
On the not-so-great side, many common cmdlets (get-ncvol, get-ncvserver, et-ncsnapshot to name a few) do not return all of the properties with REST which they do with ONTAPI. Since my scripts require these properties to be returned, I am unable to use the REST API and have to specify -ONTAPI for many of my calls.
There are other issues with REST, among them:
- REST calls in some cases are much slower than the same call with ONTAPI,
- The help pages for the cmdlets in many cases have not been fully updated to match the cmdlet (example the -ONTAPI option is not even mentioned),
- Some cmdlets behave differently with REST than with ONTAPI. I have seen the REST flavor return a Warning message that the ONTAPI flavor does not. While this is not a functional issue, it requires me to change my code to suppress or handle the warning message.
I would be happy to share specific cmdlets which I have tested and which are inconsistent between REST and ONTAPI
I call on the PSTK maintainers to continue to improve and evolve the toolkit to provide consistent functionality, behavior, and performance between REST and ONTAPI flavors of their cmdlets.
I would encourage other users to post their replies here, regarding their experience in migrating to REST with PSTK.