08-12-2016 09:52 AM - edited 03-01-2019 06:43 AM
Task Name | Example of looking at a vCenter and at every host name and comparing it to input to see if this hostname is already in existence. |
Description | |
Prerequisites | Tested on 5.5 |
Category | Workflow |
Components | vSphere 5.x |
User Inputs | |
Instructions for Regular Workflow Use:
The Workflow:
User Input to Workflow:
Run when not found:
Run when found:
Good ideal but seems to not take the case of the VM name into account. If the name inside vcenter is SERVER1 in upper case entering server1 into the check name field returns the server does not exist check.
Is there a way to take case into account as well?
If you open up the custom task the if/compare would have to change
But I am wondering since the custom task is looking at a screen in UCSD how the name shows up in the UCSD screen.
Do you have a log section where it should find it amongst your VM’s and it is not.
Hit submit to quick?
In the custom task this line(72)
if ( new java.lang.String(hostname).equals(new java.lang.String(Name)) )
Would have to be replaced with something like from this posting
https://stackoverflow.com/questions/2140627/javascript-case-insensitive-string-comparison
you would have to make sure the strings are either converted to upper or lower case..
UCSD is case sensitive – it is linux.
I ended up using your Case Sensitive / Insensitive workflow (#359) with an IfElse looking for the VMsFound == “1” condition. Works great using that RegExFilter.
I wanted something to check the name prior to starting the VM provisioning instead of just the generic error.
thanks
In UCSD 6.6 we are getting Bash/Python/javascript workflow form pre processing checking. Meaning you fill out the form and it will check when you hit submit but before the workflow runs. UCSD 6.6 will be out by March 31. ☺
That is good news, something that is definitely needed. Is 6.6 still on track for release?
thanks
Just got this from the BU
Planned for the end of April / around 23rd April, final date is tbd
Thanks for the info.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: