2013-02-06 01:39 PM
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?
2013-02-06 07:36 PM
I understand your concern. Could you please tell me what command were you trying ?
2013-02-07 06:18 AM
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).
2013-02-07 07:37 AM
I'm not sure that would be an answer, but a possible pointer in the right direction.
WFA 2.0 made a change in regards to which attributes are required for which command and the way that WFA will (or will not) complete all the object attributes.
For example: Now you can define a volume without needing to put in the array (and WFA will get the array from vol.aggregate.array).
The downside of this is that you cannot use the reference "vol.array.name " since nothing was written in the array field of the volume, but "vol.aggregate.array.name".
This is true for created objects and not found ones (For which we will pull and complete the information based on the cache).
You mentioned that the object is created earlier in the workflow, so that might be a related point. Not sure though :-)
2013-02-07 09:28 AM
Thanks, that helps me better understand what's going on. This is what I'm doing:
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?