Has anyone came across a way to query DNS from orchestrator to verify whether or not a DNS record exists? I am trying to create a WF in which a potential CNAME is presented, checked and if not used create the CNAME. Creating the entry, or removing it, is not a problem. I've googled it and came back with solutions for node.js but nothing for the js being used in orchestrator. Did anyone have success trying to perform a lookup?
Have you tried System.resolveHostName()?
A couple of days ago Christophe Decanini released Microsoft DNS plug-in (uses PowerShell internally).
Check if it suits your use case. Info about the plug-in is available here - https://communities.vmware.com/docs/DOC-36762
Unfortunately it doesn't look like it will help. We are using OpenDNS and Men & Mice (IPAM). Though I think I will end up using PowerShell regardless. Invoke the script, check for the entries and pass something back to vRO.
If you configured js-io-rights properly, you can run a lookup from the vRO appliance provided it has access to the DNS servers/zones you want to validate.
I ran the workflow to create the file but it errors on the directory.
[2017-11-03 09:57:05.399] [E] Not a directory
[2017-11-03 09:57:05.408] [E] Workflow execution stack:
***
item: 'Export logs and application settings/item1', state: 'failed', business state: 'null', exception: 'Not a directory'
workflow: 'Export logs and application settings' (A18080808080808080808080808080808080808001231146624761b79546544c2)
| 'attribute': name=zipFileName type=string value=vCO_troubleshooting
| 'input': name=localPath type=Path value=/opt/vmo/app-server/server/vmo/conf
| 'no outputs'
*** End of execution stack.
Have you tried System.resolveHostName()?
That solved my issue. Thank you very much.