cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6376
Views
9
Helpful
5
Comments
Orf Gelbrich
Cisco Employee
Cisco Employee
Task Name Random Read CSV file and creating VLANs from CSV file on networking device example
Description  
Prerequisites
  1. Tested on 5.4
Category Workflow
Components vSphere 5.x
User Inputs CSV file has to be on UCSD /tmp

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.

 

 

This workflow and custom tasks is an example of random read (define line number and it will read just that line) of a CSV file and loop through that file and feed the information to the Create VLAN on device task.

 

The overall workflow:

 

workflow_1705.png

 

Workflow inputs that need to be adjusted:

 

     Device and file/filename on the UCSD appliance.

 

Screen Shot 2015-12-19 at 5.30.50 AM.png

 

 

The workflow execution:

 

Screen Shot 2015-12-19 at 5.17.09 AM.png

Screen Shot 2015-12-19 at 5.23.53 AM.png

 

 

The VLAN(s) created:

 

Screen Shot 2015-12-19 at 5.23.30 AM.png

 

The CSV file on UCSD in /tmp:

 

Screen Shot 2015-12-19 at 5.17.46 AM.png

 

 

 

The workflow run:

 

Service Request ID: 5994

Workflow Inputs:

- FilePath

- NetworkDevice1

 

 

 

 

Dec 19, 2015 11:05:44 UTC Request submitted

Dec 19, 2015 11:05:45 UTC Executing workflow item number 1

Dec 19, 2015 11:05:45 UTC Completed workflow item number 0, with status Completed

Dec 19, 2015 11:05:54 UTC Executing workflow item number 2

Dec 19, 2015 11:05:54 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:05:54 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)

Dec 19, 2015 11:05:54 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)

Dec 19, 2015 11:05:54 UTC Executing custom script for ReadFromCSVFileRandom

Dec 19, 2015 11:05:57 UTC Line 554,vlandesc554

Dec 19, 2015 11:05:57 UTC Line 555,vlandesc555

Dec 19, 2015 11:05:57 UTC Line 556,vlandesc556

Dec 19, 2015 11:05:57 UTC Line Number : 0

Dec 19, 2015 11:05:57 UTC Sum : 1

Dec 19, 2015 11:05:57 UTC Line Number : 0

Dec 19, 2015 11:05:57 UTC Sum : 2

Dec 19, 2015 11:05:57 UTC Line Number : 0

Dec 19, 2015 11:05:57 UTC Sum : 3

Dec 19, 2015 11:05:57 UTC Processing output: out1

Dec 19, 2015 11:05:58 UTC Processing output: out2

Dec 19, 2015 11:06:00 UTC Processing output: FileMaxLines

Dec 19, 2015 11:06:01 UTC Task #1 (ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)) completed successfully in 6 seconds

Dec 19, 2015 11:06:01 UTC Input/Output values for Task #1 (ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)):

Dec 19, 2015 11:06:01 UTC [Mapped Input: FileNameWithPath = /tmp/csvfilereadtest]

Dec 19, 2015 11:06:01 UTC [Local Input: FileLineNumber = 0]

Dec 19, 2015 11:06:01 UTC [Output: out1 = undefined]

Dec 19, 2015 11:06:01 UTC [Output: out2 = undefined]

Dec 19, 2015 11:06:01 UTC [Output: FileMaxLines = 3]

Dec 19, 2015 11:06:01 UTC Completed workflow item number 1, with status Completed

Dec 19, 2015 11:06:07 UTC Executing workflow item number 3

Dec 19, 2015 11:06:07 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:06:07 UTC Executing custom action ReadFromCSVFileTesymultyline (Start Loop)

Dec 19, 2015 11:06:07 UTC Executing custom action ReadFromCSVFileTesymultyline (Start Loop)

Dec 19, 2015 11:06:10 UTC Start While task execution iteration no - 1

Dec 19, 2015 11:06:11 UTC Task #2 (ReadFromCSVFileTesymultyline (Start Loop)) completed successfully in 4 seconds

Dec 19, 2015 11:06:11 UTC Input/Output values for Task #2 (ReadFromCSVFileTesymultyline (Start Loop)):

Dec 19, 2015 11:06:11 UTC [Local Input: List based iteration = false]

Dec 19, 2015 11:06:11 UTC [Local Input: Input for list based iteration = ]

Dec 19, 2015 11:06:11 UTC [Local Input: User Input to assign iterated values = <select>]

Dec 19, 2015 11:06:11 UTC [Local Input: Count based iteration = true]

Dec 19, 2015 11:06:11 UTC [Mapped Input: Number of times to loop = 3]

Dec 19, 2015 11:06:11 UTC [Output: START_LOOP_OUTPUT = 1]

Dec 19, 2015 11:06:11 UTC Completed workflow item number 2, with status Completed

Dec 19, 2015 11:06:16 UTC Executing workflow item number 4

Dec 19, 2015 11:06:16 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:06:16 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)

Dec 19, 2015 11:06:16 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)

Dec 19, 2015 11:06:16 UTC Executing custom script for ReadFromCSVFileRandom

Dec 19, 2015 11:06:18 UTC Line 554,vlandesc554

Dec 19, 2015 11:06:18 UTC Line 555,vlandesc555

Dec 19, 2015 11:06:18 UTC Line 556,vlandesc556

Dec 19, 2015 11:06:18 UTC Line Number : 1

Dec 19, 2015 11:06:18 UTC Sum : 1

Dec 19, 2015 11:06:18 UTC --------------------------------------

Dec 19, 2015 11:06:18 UTC A0 : 554

Dec 19, 2015 11:06:18 UTC A1 : vlandesc554

Dec 19, 2015 11:06:18 UTC -------------------------------------

Dec 19, 2015 11:06:18 UTC Line Number : 1

Dec 19, 2015 11:06:18 UTC Sum : 2

Dec 19, 2015 11:06:18 UTC Line Number : 1

Dec 19, 2015 11:06:18 UTC Sum : 3

Dec 19, 2015 11:06:18 UTC Processing output: out1

Dec 19, 2015 11:06:19 UTC Processing output: out2

Dec 19, 2015 11:06:20 UTC Processing output: FileMaxLines

Dec 19, 2015 11:06:21 UTC Task #3 (ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)) completed successfully in 5 seconds

Dec 19, 2015 11:06:21 UTC Input/Output values for Task #3 (ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)):

Dec 19, 2015 11:06:21 UTC [Mapped Input: FileNameWithPath = /tmp/csvfilereadtest]

Dec 19, 2015 11:06:21 UTC [Mapped Input: FileLineNumber = 1]

Dec 19, 2015 11:06:21 UTC [Output: out1 = 554]

Dec 19, 2015 11:06:21 UTC [Output: out2 = vlandesc554]

Dec 19, 2015 11:06:21 UTC [Output: FileMaxLines = 3]

Dec 19, 2015 11:06:21 UTC Completed workflow item number 3, with status Completed

Dec 19, 2015 11:06:26 UTC Executing workflow item number 5

Dec 19, 2015 11:06:26 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:06:26 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_VARIABLE_CONVERTER_Gen2VLANID)

Dec 19, 2015 11:06:26 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_VARIABLE_CONVERTER_Gen2VLANID)

Dec 19, 2015 11:06:26 UTC Executing custom script for VARIABLE_CONVERTER_Gen2VLANID

Dec 19, 2015 11:06:29 UTC a1 : 554

Dec 19, 2015 11:06:29 UTC Processing output: A_Prime

Dec 19, 2015 11:06:30 UTC Task #4 (ReadFromCSVFileTesymultyline (custom_VARIABLE_CONVERTER_Gen2VLANID)) completed successfully in 4 seconds

Dec 19, 2015 11:06:30 UTC Input/Output values for Task #4 (ReadFromCSVFileTesymultyline (custom_VARIABLE_CONVERTER_Gen2VLANID)):

Dec 19, 2015 11:06:30 UTC [Mapped Input: A = 554]

Dec 19, 2015 11:06:30 UTC [Output: A_Prime = 554]

Dec 19, 2015 11:06:30 UTC Completed workflow item number 4, with status Completed

Dec 19, 2015 11:06:32 UTC Executing workflow item number 6

Dec 19, 2015 11:06:32 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:06:32 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_VLAN Check)

Dec 19, 2015 11:06:32 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_VLAN Check)

Dec 19, 2015 11:06:32 UTC Executing custom script for VLAN Check

Dec 19, 2015 11:06:35 UTC VLANID : 554

Dec 19, 2015 11:06:35 UTC netDevice : Default Datacenter@172.17.34.5

Dec 19, 2015 11:06:35 UTC Device IP...............: 172.17.34.5

Dec 19, 2015 11:06:35 UTC Device DC...............: Default Datacenter

Dec 19, 2015 11:06:35 UTC Looking/Filtering for device IP...............: 172.17.34.5

Dec 19, 2015 11:06:35 UTC Looking/Filtering for VLAN ID...............: 554

Dec 19, 2015 11:06:35 UTC Zero or Less...............:

Dec 19, 2015 11:06:35 UTC Number of Rows found...............: 0

Dec 19, 2015 11:06:35 UTC Scirpt exited normally

Dec 19, 2015 11:06:35 UTC Processing output: ReturnStatus

Dec 19, 2015 11:06:36 UTC Task #5 (ReadFromCSVFileTesymultyline (custom_VLAN Check)) completed successfully in 3 seconds

Dec 19, 2015 11:06:36 UTC Input/Output values for Task #5 (ReadFromCSVFileTesymultyline (custom_VLAN Check)):

Dec 19, 2015 11:06:36 UTC [Mapped Input: VLAN_ID = 554]

Dec 19, 2015 11:06:36 UTC [Local Input: Select Device = Default Datacenter@172.17.34.5]

Dec 19, 2015 11:06:36 UTC [Output: ReturnStatus = 0]

Dec 19, 2015 11:06:36 UTC Completed workflow item number 5, with status Completed

Dec 19, 2015 11:06:41 UTC Executing workflow item number 7

Dec 19, 2015 11:06:41 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:06:41 UTC Executing custom action ReadFromCSVFileTesymultyline (Create VLAN)

Dec 19, 2015 11:06:41 UTC Executing custom action ReadFromCSVFileTesymultyline (Create VLAN)

Dec 19, 2015 11:06:43 UTC Selected Device: Default Datacenter@172.17.34.5

Dec 19, 2015 11:06:43 UTC VLAN ID: 554

Dec 19, 2015 11:06:43 UTC VLAN Name: vlandesc554

Dec 19, 2015 11:06:47 UTC Executing script on device 172.17.34.5 [!abort, !confmode, configure terminal, vlan 554, name vlandesc554, exit, copy running-config startup-config]

Dec 19, 2015 11:06:51 UTC Delivering following commands to device: 172.17.34.5

Dec 19, 2015 11:06:51 UTC

Dec 19, 2015 11:06:51 UTC Start of command set

Dec 19, 2015 11:06:51 UTC configure terminal

Dec 19, 2015 11:06:51 UTC vlan 554

Dec 19, 2015 11:06:51 UTC name vlandesc554

Dec 19, 2015 11:06:51 UTC exit

Dec 19, 2015 11:06:51 UTC copy running-config startup-config

Dec 19, 2015 11:06:51 UTC End of command set

Dec 19, 2015 11:06:51 UTC

Dec 19, 2015 11:06:58 UTC Task #6 (ReadFromCSVFileTesymultyline (Create VLAN)) completed successfully in 17 seconds

Dec 19, 2015 11:06:58 UTC Input/Output values for Task #6 (ReadFromCSVFileTesymultyline (Create VLAN)):

Dec 19, 2015 11:06:58 UTC [Local Input: Select Device = Default Datacenter@172.17.34.5]

Dec 19, 2015 11:06:58 UTC [Local Input: VDC Name = ]

Dec 19, 2015 11:06:58 UTC [Mapped Input: VLAN ID = 554]

Dec 19, 2015 11:06:58 UTC [Mapped Input: VLAN Name = vlandesc554]

Dec 19, 2015 11:06:58 UTC [Local Input: Overwrite Existing VLAN = false]

Dec 19, 2015 11:06:58 UTC [Local Input: Copy Running configuration to Startup configuration = true]

Dec 19, 2015 11:06:58 UTC [Output: DATACENTER = Default Datacenter]

Dec 19, 2015 11:06:58 UTC [Output: DEVICE_IP = 172.17.34.5]

Dec 19, 2015 11:06:58 UTC [Output: VLAN_ID = 554]

Dec 19, 2015 11:06:58 UTC [Output: OUTPUT_DEVICE_VLAN_IDENTITY = Default Datacenter@172.17.34.5@554]

Dec 19, 2015 11:06:58 UTC [Output: VLAN_NAME = vlandesc554]

Dec 19, 2015 11:06:58 UTC [Output: OUTPUT_NETWORKING_DEVICE = Default Datacenter@172.17.34.5]

Dec 19, 2015 11:06:58 UTC [Output: OUTPUT_NEXUS_VDC = ]

Dec 19, 2015 11:06:58 UTC Completed workflow item number 6, with status Completed

Dec 19, 2015 11:06:59 UTC Executing workflow item number 8

Dec 19, 2015 11:06:59 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:06:59 UTC Executing custom action ReadFromCSVFileTesymultyline (End Loop)

Dec 19, 2015 11:06:59 UTC Executing custom action ReadFromCSVFileTesymultyline (End Loop)

Dec 19, 2015 11:07:02 UTC End While task execution iteration no - 1

Dec 19, 2015 11:07:02 UTC Task #7 (ReadFromCSVFileTesymultyline (End Loop)) completed successfully in 3 seconds

Dec 19, 2015 11:07:02 UTC Input/Output values for Task #7 (ReadFromCSVFileTesymultyline (End Loop)):

Dec 19, 2015 11:07:02 UTC Completed workflow item number 7, with status

Dec 19, 2015 11:07:08 UTC Executing workflow item number 3

Dec 19, 2015 11:07:08 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:07:09 UTC Executing custom action ReadFromCSVFileTesymultyline (Start Loop)

Dec 19, 2015 11:07:09 UTC Executing custom action ReadFromCSVFileTesymultyline (Start Loop)

Dec 19, 2015 11:07:11 UTC Start While task execution iteration no - 2

Dec 19, 2015 11:07:13 UTC Task #2 (ReadFromCSVFileTesymultyline (Start Loop)) completed successfully in 4 seconds

Dec 19, 2015 11:07:13 UTC Input/Output values for Task #2 (ReadFromCSVFileTesymultyline (Start Loop)):

Dec 19, 2015 11:07:13 UTC [Local Input: List based iteration = false]

Dec 19, 2015 11:07:13 UTC [Local Input: Input for list based iteration = ]

Dec 19, 2015 11:07:13 UTC [Local Input: User Input to assign iterated values = <select>]

Dec 19, 2015 11:07:13 UTC [Local Input: Count based iteration = true]

Dec 19, 2015 11:07:13 UTC [Mapped Input: Number of times to loop = 3]

Dec 19, 2015 11:07:13 UTC [Output: START_LOOP_OUTPUT = 2]

Dec 19, 2015 11:07:13 UTC Completed workflow item number 2, with status Completed

Dec 19, 2015 11:07:18 UTC Executing workflow item number 4

Dec 19, 2015 11:07:18 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:07:18 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)

Dec 19, 2015 11:07:18 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)

Dec 19, 2015 11:07:18 UTC Executing custom script for ReadFromCSVFileRandom

Dec 19, 2015 11:07:21 UTC Line 554,vlandesc554

Dec 19, 2015 11:07:21 UTC Line 555,vlandesc555

Dec 19, 2015 11:07:21 UTC Line 556,vlandesc556

Dec 19, 2015 11:07:21 UTC Line Number : 2

Dec 19, 2015 11:07:21 UTC Sum : 1

Dec 19, 2015 11:07:21 UTC Line Number : 2

Dec 19, 2015 11:07:21 UTC Sum : 2

Dec 19, 2015 11:07:21 UTC --------------------------------------

Dec 19, 2015 11:07:21 UTC A0 : 555

Dec 19, 2015 11:07:21 UTC A1 : vlandesc555

Dec 19, 2015 11:07:21 UTC -------------------------------------

Dec 19, 2015 11:07:21 UTC Line Number : 2

Dec 19, 2015 11:07:21 UTC Sum : 3

Dec 19, 2015 11:07:21 UTC Processing output: out1

Dec 19, 2015 11:07:23 UTC Processing output: out2

Dec 19, 2015 11:07:25 UTC Processing output: FileMaxLines

Dec 19, 2015 11:07:27 UTC Task #3 (ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)) completed successfully in 8 seconds

Dec 19, 2015 11:07:27 UTC Input/Output values for Task #3 (ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)):

Dec 19, 2015 11:07:27 UTC [Mapped Input: FileNameWithPath = /tmp/csvfilereadtest]

Dec 19, 2015 11:07:27 UTC [Mapped Input: FileLineNumber = 2]

Dec 19, 2015 11:07:27 UTC [Output: out1 = 555]

Dec 19, 2015 11:07:27 UTC [Output: out2 = vlandesc555]

Dec 19, 2015 11:07:27 UTC [Output: FileMaxLines = 3]

Dec 19, 2015 11:07:27 UTC Completed workflow item number 3, with status Completed

Dec 19, 2015 11:07:28 UTC Executing workflow item number 5

Dec 19, 2015 11:07:28 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:07:28 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_VARIABLE_CONVERTER_Gen2VLANID)

Dec 19, 2015 11:07:28 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_VARIABLE_CONVERTER_Gen2VLANID)

Dec 19, 2015 11:07:28 UTC Executing custom script for VARIABLE_CONVERTER_Gen2VLANID

Dec 19, 2015 11:07:32 UTC a1 : 555

Dec 19, 2015 11:07:32 UTC Processing output: A_Prime

Dec 19, 2015 11:07:34 UTC Task #4 (ReadFromCSVFileTesymultyline (custom_VARIABLE_CONVERTER_Gen2VLANID)) completed successfully in 5 seconds

Dec 19, 2015 11:07:34 UTC Input/Output values for Task #4 (ReadFromCSVFileTesymultyline (custom_VARIABLE_CONVERTER_Gen2VLANID)):

Dec 19, 2015 11:07:34 UTC [Mapped Input: A = 555]

Dec 19, 2015 11:07:34 UTC [Output: A_Prime = 555]

Dec 19, 2015 11:07:34 UTC Completed workflow item number 4, with status Completed

Dec 19, 2015 11:07:34 UTC Executing workflow item number 6

Dec 19, 2015 11:07:34 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:07:34 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_VLAN Check)

Dec 19, 2015 11:07:34 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_VLAN Check)

Dec 19, 2015 11:07:34 UTC Executing custom script for VLAN Check

Dec 19, 2015 11:07:37 UTC VLANID : 555

Dec 19, 2015 11:07:37 UTC netDevice : Default Datacenter@172.17.34.5

Dec 19, 2015 11:07:37 UTC Device IP...............: 172.17.34.5

Dec 19, 2015 11:07:37 UTC Device DC...............: Default Datacenter

Dec 19, 2015 11:07:37 UTC Looking/Filtering for device IP...............: 172.17.34.5

Dec 19, 2015 11:07:37 UTC Looking/Filtering for VLAN ID...............: 555

Dec 19, 2015 11:07:37 UTC Zero or Less...............:

Dec 19, 2015 11:07:37 UTC Number of Rows found...............: 0

Dec 19, 2015 11:07:37 UTC Scirpt exited normally

Dec 19, 2015 11:07:37 UTC Processing output: ReturnStatus

Dec 19, 2015 11:07:40 UTC Task #5 (ReadFromCSVFileTesymultyline (custom_VLAN Check)) completed successfully in 5 seconds

Dec 19, 2015 11:07:40 UTC Input/Output values for Task #5 (ReadFromCSVFileTesymultyline (custom_VLAN Check)):

Dec 19, 2015 11:07:40 UTC [Mapped Input: VLAN_ID = 555]

Dec 19, 2015 11:07:40 UTC [Local Input: Select Device = Default Datacenter@172.17.34.5]

Dec 19, 2015 11:07:40 UTC [Output: ReturnStatus = 0]

Dec 19, 2015 11:07:40 UTC Completed workflow item number 5, with status Completed

Dec 19, 2015 11:07:44 UTC Executing workflow item number 7

Dec 19, 2015 11:07:44 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:07:44 UTC Executing custom action ReadFromCSVFileTesymultyline (Create VLAN)

Dec 19, 2015 11:07:44 UTC Executing custom action ReadFromCSVFileTesymultyline (Create VLAN)

Dec 19, 2015 11:07:48 UTC Selected Device: Default Datacenter@172.17.34.5

Dec 19, 2015 11:07:48 UTC VLAN ID: 555

Dec 19, 2015 11:07:48 UTC VLAN Name: vlandesc555

Dec 19, 2015 11:07:51 UTC Executing script on device 172.17.34.5 [!abort, !confmode, configure terminal, vlan 555, name vlandesc555, exit, copy running-config startup-config]

Dec 19, 2015 11:07:55 UTC Delivering following commands to device: 172.17.34.5

Dec 19, 2015 11:07:55 UTC

Dec 19, 2015 11:07:55 UTC Start of command set

Dec 19, 2015 11:07:55 UTC configure terminal

Dec 19, 2015 11:07:55 UTC vlan 555

Dec 19, 2015 11:07:55 UTC name vlandesc555

Dec 19, 2015 11:07:55 UTC exit

Dec 19, 2015 11:07:55 UTC copy running-config startup-config

Dec 19, 2015 11:07:55 UTC End of command set

Dec 19, 2015 11:07:55 UTC

Dec 19, 2015 11:08:10 UTC Task #6 (ReadFromCSVFileTesymultyline (Create VLAN)) completed successfully in 26 seconds

Dec 19, 2015 11:08:10 UTC Input/Output values for Task #6 (ReadFromCSVFileTesymultyline (Create VLAN)):

Dec 19, 2015 11:08:10 UTC [Local Input: Select Device = Default Datacenter@172.17.34.5]

Dec 19, 2015 11:08:10 UTC [Local Input: VDC Name = ]

Dec 19, 2015 11:08:10 UTC [Mapped Input: VLAN ID = 555]

Dec 19, 2015 11:08:10 UTC [Mapped Input: VLAN Name = vlandesc555]

Dec 19, 2015 11:08:10 UTC [Local Input: Overwrite Existing VLAN = false]

Dec 19, 2015 11:08:10 UTC [Local Input: Copy Running configuration to Startup configuration = true]

Dec 19, 2015 11:08:10 UTC [Output: DATACENTER = Default Datacenter]

Dec 19, 2015 11:08:10 UTC [Output: DEVICE_IP = 172.17.34.5]

Dec 19, 2015 11:08:10 UTC [Output: VLAN_ID = 555]

Dec 19, 2015 11:08:10 UTC [Output: OUTPUT_DEVICE_VLAN_IDENTITY = Default Datacenter@172.17.34.5@555]

Dec 19, 2015 11:08:10 UTC [Output: VLAN_NAME = vlandesc555]

Dec 19, 2015 11:08:10 UTC [Output: OUTPUT_NETWORKING_DEVICE = Default Datacenter@172.17.34.5]

Dec 19, 2015 11:08:10 UTC [Output: OUTPUT_NEXUS_VDC = ]

Dec 19, 2015 11:08:10 UTC Completed workflow item number 6, with status Completed

Dec 19, 2015 11:08:14 UTC Executing workflow item number 8

Dec 19, 2015 11:08:14 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:08:14 UTC Executing custom action ReadFromCSVFileTesymultyline (End Loop)

Dec 19, 2015 11:08:14 UTC Executing custom action ReadFromCSVFileTesymultyline (End Loop)

Dec 19, 2015 11:08:17 UTC End While task execution iteration no - 2

Dec 19, 2015 11:08:18 UTC Task #7 (ReadFromCSVFileTesymultyline (End Loop)) completed successfully in 3 seconds

Dec 19, 2015 11:08:18 UTC Input/Output values for Task #7 (ReadFromCSVFileTesymultyline (End Loop)):

Dec 19, 2015 11:08:18 UTC Completed workflow item number 7, with status

Dec 19, 2015 11:08:23 UTC Executing workflow item number 3

Dec 19, 2015 11:08:23 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:08:23 UTC Executing custom action ReadFromCSVFileTesymultyline (Start Loop)

Dec 19, 2015 11:08:23 UTC Executing custom action ReadFromCSVFileTesymultyline (Start Loop)

Dec 19, 2015 11:08:28 UTC Start While task execution iteration no - 3

Dec 19, 2015 11:08:31 UTC Task #2 (ReadFromCSVFileTesymultyline (Start Loop)) completed successfully in 8 seconds

Dec 19, 2015 11:08:31 UTC Input/Output values for Task #2 (ReadFromCSVFileTesymultyline (Start Loop)):

Dec 19, 2015 11:08:31 UTC [Local Input: List based iteration = false]

Dec 19, 2015 11:08:31 UTC [Local Input: Input for list based iteration = ]

Dec 19, 2015 11:08:31 UTC [Local Input: User Input to assign iterated values = <select>]

Dec 19, 2015 11:08:31 UTC [Local Input: Count based iteration = true]

Dec 19, 2015 11:08:31 UTC [Mapped Input: Number of times to loop = 3]

Dec 19, 2015 11:08:31 UTC [Output: START_LOOP_OUTPUT = 3]

Dec 19, 2015 11:08:31 UTC Completed workflow item number 2, with status Completed

Dec 19, 2015 11:08:35 UTC Executing workflow item number 4

Dec 19, 2015 11:08:35 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:08:35 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)

Dec 19, 2015 11:08:35 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)

Dec 19, 2015 11:08:35 UTC Executing custom script for ReadFromCSVFileRandom

Dec 19, 2015 11:08:38 UTC Line 554,vlandesc554

Dec 19, 2015 11:08:38 UTC Line 555,vlandesc555

Dec 19, 2015 11:08:38 UTC Line 556,vlandesc556

Dec 19, 2015 11:08:38 UTC Line Number : 3

Dec 19, 2015 11:08:38 UTC Sum : 1

Dec 19, 2015 11:08:38 UTC Line Number : 3

Dec 19, 2015 11:08:38 UTC Sum : 2

Dec 19, 2015 11:08:38 UTC Line Number : 3

Dec 19, 2015 11:08:38 UTC Sum : 3

Dec 19, 2015 11:08:38 UTC --------------------------------------

Dec 19, 2015 11:08:38 UTC A0 : 556

Dec 19, 2015 11:08:38 UTC A1 : vlandesc556

Dec 19, 2015 11:08:38 UTC -------------------------------------

Dec 19, 2015 11:08:38 UTC Processing output: out1

Dec 19, 2015 11:08:42 UTC Processing output: out2

Dec 19, 2015 11:08:47 UTC Processing output: FileMaxLines

Dec 19, 2015 11:08:50 UTC Task #3 (ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)) completed successfully in 14 seconds

Dec 19, 2015 11:08:50 UTC Input/Output values for Task #3 (ReadFromCSVFileTesymultyline (custom_ReadFromCSVFileRandom)):

Dec 19, 2015 11:08:50 UTC [Mapped Input: FileNameWithPath = /tmp/csvfilereadtest]

Dec 19, 2015 11:08:50 UTC [Mapped Input: FileLineNumber = 3]

Dec 19, 2015 11:08:50 UTC [Output: out1 = 556]

Dec 19, 2015 11:08:50 UTC [Output: out2 = vlandesc556]

Dec 19, 2015 11:08:50 UTC [Output: FileMaxLines = 3]

Dec 19, 2015 11:08:50 UTC Completed workflow item number 3, with status Completed

Dec 19, 2015 11:08:51 UTC Executing workflow item number 5

Dec 19, 2015 11:08:51 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:08:51 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_VARIABLE_CONVERTER_Gen2VLANID)

Dec 19, 2015 11:08:51 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_VARIABLE_CONVERTER_Gen2VLANID)

Dec 19, 2015 11:08:51 UTC Executing custom script for VARIABLE_CONVERTER_Gen2VLANID

Dec 19, 2015 11:08:54 UTC a1 : 556

Dec 19, 2015 11:08:54 UTC Processing output: A_Prime

Dec 19, 2015 11:09:00 UTC Task #4 (ReadFromCSVFileTesymultyline (custom_VARIABLE_CONVERTER_Gen2VLANID)) completed successfully in 9 seconds

Dec 19, 2015 11:09:00 UTC Input/Output values for Task #4 (ReadFromCSVFileTesymultyline (custom_VARIABLE_CONVERTER_Gen2VLANID)):

Dec 19, 2015 11:09:00 UTC [Mapped Input: A = 556]

Dec 19, 2015 11:09:00 UTC [Output: A_Prime = 556]

Dec 19, 2015 11:09:00 UTC Completed workflow item number 4, with status Completed

Dec 19, 2015 11:09:03 UTC Executing workflow item number 6

Dec 19, 2015 11:09:03 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:09:03 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_VLAN Check)

Dec 19, 2015 11:09:03 UTC Executing custom action ReadFromCSVFileTesymultyline (custom_VLAN Check)

Dec 19, 2015 11:09:04 UTC Executing custom script for VLAN Check

Dec 19, 2015 11:09:07 UTC VLANID : 556

Dec 19, 2015 11:09:07 UTC netDevice : Default Datacenter@172.17.34.5

Dec 19, 2015 11:09:07 UTC Device IP...............: 172.17.34.5

Dec 19, 2015 11:09:07 UTC Device DC...............: Default Datacenter

Dec 19, 2015 11:09:07 UTC Looking/Filtering for device IP...............: 172.17.34.5

Dec 19, 2015 11:09:07 UTC Looking/Filtering for VLAN ID...............: 556

Dec 19, 2015 11:09:07 UTC Zero or Less...............:

Dec 19, 2015 11:09:07 UTC Number of Rows found...............: 0

Dec 19, 2015 11:09:07 UTC Scirpt exited normally

Dec 19, 2015 11:09:07 UTC Processing output: ReturnStatus

Dec 19, 2015 11:09:11 UTC Task #5 (ReadFromCSVFileTesymultyline (custom_VLAN Check)) completed successfully in 7 seconds

Dec 19, 2015 11:09:11 UTC Input/Output values for Task #5 (ReadFromCSVFileTesymultyline (custom_VLAN Check)):

Dec 19, 2015 11:09:11 UTC [Mapped Input: VLAN_ID = 556]

Dec 19, 2015 11:09:11 UTC [Local Input: Select Device = Default Datacenter@172.17.34.5]

Dec 19, 2015 11:09:11 UTC [Output: ReturnStatus = 0]

Dec 19, 2015 11:09:11 UTC Completed workflow item number 5, with status Completed

Dec 19, 2015 11:09:13 UTC Executing workflow item number 7

Dec 19, 2015 11:09:13 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:09:13 UTC Executing custom action ReadFromCSVFileTesymultyline (Create VLAN)

Dec 19, 2015 11:09:13 UTC Executing custom action ReadFromCSVFileTesymultyline (Create VLAN)

Dec 19, 2015 11:09:16 UTC Selected Device: Default Datacenter@172.17.34.5

Dec 19, 2015 11:09:16 UTC VLAN ID: 556

Dec 19, 2015 11:09:16 UTC VLAN Name: vlandesc556

Dec 19, 2015 11:09:19 UTC Executing script on device 172.17.34.5 [!abort, !confmode, configure terminal, vlan 556, name vlandesc556, exit, copy running-config startup-config]

Dec 19, 2015 11:09:23 UTC Delivering following commands to device: 172.17.34.5

Dec 19, 2015 11:09:23 UTC

Dec 19, 2015 11:09:23 UTC Start of command set

Dec 19, 2015 11:09:23 UTC configure terminal

Dec 19, 2015 11:09:23 UTC vlan 556

Dec 19, 2015 11:09:23 UTC name vlandesc556

Dec 19, 2015 11:09:23 UTC exit

Dec 19, 2015 11:09:23 UTC copy running-config startup-config

Dec 19, 2015 11:09:23 UTC End of command set

Dec 19, 2015 11:09:23 UTC

Dec 19, 2015 11:09:52 UTC Task #6 (ReadFromCSVFileTesymultyline (Create VLAN)) completed successfully in 39 seconds

Dec 19, 2015 11:09:52 UTC Input/Output values for Task #6 (ReadFromCSVFileTesymultyline (Create VLAN)):

Dec 19, 2015 11:09:52 UTC [Local Input: Select Device = Default Datacenter@172.17.34.5]

Dec 19, 2015 11:09:52 UTC [Local Input: VDC Name = ]

Dec 19, 2015 11:09:52 UTC [Mapped Input: VLAN ID = 556]

Dec 19, 2015 11:09:52 UTC [Mapped Input: VLAN Name = vlandesc556]

Dec 19, 2015 11:09:52 UTC [Local Input: Overwrite Existing VLAN = false]

Dec 19, 2015 11:09:52 UTC [Local Input: Copy Running configuration to Startup configuration = true]

Dec 19, 2015 11:09:52 UTC [Output: DATACENTER = Default Datacenter]

Dec 19, 2015 11:09:52 UTC [Output: DEVICE_IP = 172.17.34.5]

Dec 19, 2015 11:09:52 UTC [Output: VLAN_ID = 556]

Dec 19, 2015 11:09:52 UTC [Output: OUTPUT_DEVICE_VLAN_IDENTITY = Default Datacenter@172.17.34.5@556]

Dec 19, 2015 11:09:52 UTC [Output: VLAN_NAME = vlandesc556]

Dec 19, 2015 11:09:52 UTC [Output: OUTPUT_NETWORKING_DEVICE = Default Datacenter@172.17.34.5]

Dec 19, 2015 11:09:52 UTC [Output: OUTPUT_NEXUS_VDC = ]

Dec 19, 2015 11:09:52 UTC Completed workflow item number 6, with status Completed

Dec 19, 2015 11:09:53 UTC Executing workflow item number 8

Dec 19, 2015 11:09:53 UTC Trigger context executeWorkFlowStep called

Dec 19, 2015 11:09:53 UTC Executing custom action ReadFromCSVFileTesymultyline (End Loop)

Dec 19, 2015 11:09:53 UTC Executing custom action ReadFromCSVFileTesymultyline (End Loop)

Dec 19, 2015 11:09:56 UTC End While task execution iteration no - 3

Dec 19, 2015 11:09:56 UTC Task #7 (ReadFromCSVFileTesymultyline (End Loop)) completed successfully in 2 seconds

Dec 19, 2015 11:09:56 UTC Input/Output values for Task #7 (ReadFromCSVFileTesymultyline (End Loop)):

Dec 19, 2015 11:09:56 UTC Completed workflow item number 7, with status Completed

Dec 19, 2015 11:10:03 UTC Executing workflow item number 9

Dec 19, 2015 11:10:03 UTC Completed workflow item number 8, with status Completed

 

 

The workflow roll back:

 

     3 VLAN(s) were created and 3 are rolled back.

Screen Shot 2015-12-19 at 5.27.36 AM.png

Comments
ajithprasath
Level 1
Level 1

HI Orf Gelbrich,

 

We have created a custom workflow which will prompt the VM NAME, User Name, Group Name, VDC name, VM TAG and modify lifecycle (set termination time). Basically this is created to Migrate VMs into UCSD . we have manually tested this and working fine. Is it possible to pass the entire list of VM details from a CSV and make it automated while executing.

 

Thanks,

Ajith 

Orf Gelbrich
Cisco Employee
Cisco Employee

Yes 100% possible.  I think this example here uses 3 or 4 columns.  You would have to expand the custom task with the number of columns you would like to read in. 

 

Orf Gelbrich
Cisco Employee
Cisco Employee
Yes 100% possible. I think this example here uses 3 or 4 columns. You would have to expand the custom task with the number of columns you would like to read in.



ajithprasath
Level 1
Level 1

Thanks Orf! Do i need to make any changes in the script to add more columns? could you please guide me

Orf Gelbrich
Cisco Employee
Cisco Employee

I just attached a 10 Column Example above.  When you open up the custom task you will find the code and it will be apparent  what needs to be done when you want to add 5 more columns to the task. 

 

Screen Shot 2018-10-11 at 9.28.52 AM.png

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