I'm referencing object fields for command parameters, and whenever I specify more than one object deep, I get the Illegal Expression error show above. I've seen this with several different objects and references. I used parameter completion to create the name, so I know the object, reference, and field names are correct. There is no other information in any log files. That type of object.reference.field access worked in WFA 1.1.1, and I'm wondering of this is a defect or an intentional change in 2.0?
I'm using my own version of Map Lun that doesn't require a LUN object reference (created by cloning Map Lun and removing the parameter mappings). In my case, I am operating on a LUN in a cloned volume created earlier in the workflow. The LUN in the volume doesn't exist in the cache, and neither does the qtree, vfiler, or volume objects it references. The underlying PowerShell code only requires string name arguments, and taking many additional steps to create a LUN object just to supply those names is something I would like to avoid.
I have a reference to the LUN in the parent volume, and am trying to use the qtree name in that object for the QtreeName argument to my Map Lun command (parentLun.qtree.name). I can't use the parentLun.qtree reference, because that tree is in the wrong volume (the parent, not the clone).
Thanks, that helps me better understand what's going on. This is what I'm doing:
Find the array by name using No-Op
Find the parent volume by name and array using No-Op. This should fully populate the found variable (parentVol), correct? So "parentVol.qtree" should be a valid reference, and parentVol.qtree.name should be accessible, if I understand correctly.
Find the most recent clone based on name prefix and array, as the argument to Remove Volume.
Map a LUN in the clone to a known igroup using strings for arguments, rather than a LUN object.
The problem is, any qtrees and LUNs in the cloned volume are not in the cache or a reservation, so creating the LUN object to hand to the certified Map Lun command is problematic. I know the name of the qtree in the clone will be the same as the name of the qtree in the parent, so I want to provide "parentVol.qtree.name" as the qtree name parameter to my Map Lun. But, I'm getting the Illegal Expression error.
Illegal Expression suggests a syntax error, rather than a deference error. Is that the message I would receive if qtree were null in the parentVol.qtree.name expression?