Is there a way we can call ONTAP zapis from a WFA function?
Following is my scenario:
- I have a workflow to create a destination volume and then create a SM relationship between specified source and destination volumes.
- I am using Create CM Volume command, where the name of the volume is constructed inside the FindCharts by means of a Finder variables and a few input variables.
- I wrote a powershell function inside the Create CM Volume command which takes care of choosing a unique name for volume. It appends/increments the number in the end of the volume and checks for its existence on the ONTAP.
- But I cannot use the new constructed name in the next command for creating the relationship, since that data lies within the Create CM Volume command.
So if there is a way to make zapi calls from within the function, then I can shift the logic of construction unique volume names from powershell command functions to MVEL WFA functions.
WFA can support incrementing names based on the data available in the cache. It is pretty easy to go in and find the last volume created of a naming pattern and then using MVEL functions increment the name. This could be done by modifying the Find CM Volume finder and then returning the highest number. Once you have the value, then use the nextNamePadded function to increment the name. This will eliminate the need to check at runtime and move the calculation into the planning phase.