So I basically haven’t slept in two weeks. I thought it would be a good idea to pick up the torch, and contribute on the NetApp Ontap SDK to PowerShell. I’m sure you’ve seen the Codeplex project by now if not here. I have a couple of personal issues with this first swing, and initially I set out to help. Two weeks later I have completely rewrote the whole cha-bang. I’m not a dev, and I don’t pretend to know as much as Adam. I am however an Administrator who uses PowerShell and NetApp’s every day. From that perspective I’m writing what I need the cmdlets to do. Very quickly I ran into a style issue… My question to the mob is simple of the three examples below, what would be your preference?
[1]PS > Get-NaDisk –disk v0.20| Fail-NaDisk –force
[2]PS > (Get-NaDisk –disk v0.20).FailDisk()
[3]PS > Get-NaDisk –disk v0.20 | set-NaDisk –Fail -confirm:$false
What do you think? One is the most intuitive, but will lead to over 500 cmdlets! Option two is the least intuitive, but would produce the tightest code. Finally option 3 per the PowerShell team documentation option 3 is the “correct way of doing it”… I wan’t to use option 1 but It requires the use of an illegal unaproved verb “Fail”.
Help…
~Glenn
UPDATE: My basis for not using Fail-NaDisk. Although, I believe that Fail-NaDisk is more in line with the spirit of powershell.