cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4855
Views
1
Helpful
10
Comments
Orf Gelbrich
Cisco Employee
Cisco Employee
Task NameExample 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

CategoryWorkflow
ComponentsvSphere 5.x
User Inputs


Instructions for Regular Workflow Use:

  1. Download the attached .ZIP file below to your computer. *Remember the location of the saved file on your computer.
  2. Unzip the file on your computer. Should end up with a .WFD file.
  3. Log in to UCS Director as a user that has "system-admin" privileges.
  4. Navigate to "Policies-->Orchestration" and click on "Import".
  5. Click "Browse" and navigate to the location on your computer where the .WFD file resides. Choose the .WFD file and click "Open".
  6. Click "Upload" and then "OK" once the file upload is completed. Then click "Next".
  7. Click the "Select" button next to "Import Workflows". Click the "Check All" button to check all checkboxes and then the "Select" button.
  8. Click "Submit".
  9. A new folder should appear in "Policies-->Orchestration" that contains the imported workflow. You will now need to update the included tasks with information about the specific environment.

The Workflow:

Screen Shot 2016-08-12 at 11.48.50 AM.png

User Input to Workflow:

Screen Shot 2016-08-12 at 11.48.30 AM.png

Run when not found:

Screen Shot 2016-08-12 at 11.46.27 AM.png

Run when found:

Screen Shot 2016-08-12 at 11.47.21 AM.png

Comments
Somersbd99
Community Member

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?

Orf Gelbrich
Cisco Employee
Cisco Employee

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.

Somersbd99
Community Member

Orf Gelbrich
Cisco Employee
Cisco Employee

Hit submit to quick?

Orf Gelbrich
Cisco Employee
Cisco Employee

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.

Somersbd99
Community Member

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

Orf Gelbrich
Cisco Employee
Cisco Employee

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. ☺

Somersbd99
Community Member

That is good news, something that is definitely needed. Is 6.6 still on track for release?

thanks

Orf Gelbrich
Cisco Employee
Cisco Employee

Just got this from the BU

Planned for the end of April / around 23rd April, final date is tbd

Somersbd99
Community Member

Thanks for the info.

Getting Started

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:

Quick Links