I'm having trouble substituting strings in error messages that I've defined via ExtensionManager.
I define a couple of tasks and faults and added the localization resources. I read documentation indicating that I could do variable substitution in my localized strings (http://communities.vmware.com/# http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvmodl.LocalizableMessage.html).
For example, if my localized string is "The IP {ip} is already taken", then I could substitute {ip} with a "127.0.0.1".
I expected the vsphere GUI to show me the error message "The IP 127.0.0.1 is already taken" but I only get "The IP is already taken".
I explored the error object in the MOB and it appears fine. The key value pair ip/127.0.0.1 is definitely set. Am I using it wrong? I'm using vsphere 5.1.
------------------------------------------------
My extension defines the following localization resource (type=fault):
my_fault.summary = "The IP {ip} is already taken"
Data Object Type: ExtendedFault Parent Managed Object ID: task-1098 Property Path: info.error |
Properties
NAME | TYPE | VALUE | ||
---|---|---|---|---|
data | KeyValue[] |
| ||
dynamicProperty | DynamicProperty[] | Unset | ||
dynamicType | string | Unset | ||
faultCause | MethodFault | Unset | ||
faultMessage | LocalizableMessage[] | Unset | ||
faultTypeId | string | "my_fault" |
Data Object Type: KeyValue Parent Managed Object ID: task-1099 Property Path: info.error.data["ip"] |
Properties
NAME | TYPE | VALUE |
---|---|---|
dynamicProperty | DynamicProperty[] | Unset |
dynamicType | string | Unset |
key | string | "ip" |
value | string | "127.0.0.1" |