Cisco UCS Director Orchestration Guide, Release 5.3
First Published: April 17, 2015
Last Modified: September 11, 2015
Americas Headquarters
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 527-0883
Text Part Number: Beta Draft
© 2013-2015
Cisco Systems, Inc. All rights reserved.
CONTENTS
Preface
Preface vii
Audience vii
Conventions vii
Related Documentation ix
Documentation Feedback ix
Obtaining Documentation and Submitting a Service Request ix
CHAPTER 1
New and Changed Information 1
New and Changed Information 1
CHAPTER 2
Overview 3
About Orchestrator 3
CHAPTER 3
Understanding Workflows 5
About Workflows 5
Workflow Designer 5
Workflow Life Cycle Editing Actions 5
Predefined Tasks 7
Accessing Task Documentation 7
CHAPTER 4
Creating Workflows 9
Creating a Compound Task 22
Custom Approval Tasks 24
Creating a Custom Approval Task 25
Adding a Custom Approval Task to a Workflow 25
Custom Input Value 26
Example: Creating a Custom Input Type by using a List of Values (LOV) 28
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
iii
Contents
Adding a Custom Input into a Workflow 30
Example: Establishing a List of Values Based on Filter Criteria 31
Example: Creating a Custom Input Type by a Unique Selection 35
Moving Inputs 37
Accessing the Input/Output Tab 37
Accessing Outputs from a Previous Task 37
Cross Launching Workflow Inputs 38
Registering Custom Workflow Inputs 38
Using Script Modules 40
Adding Script Modules 41
Adding Libraries 41
Accessing Libraries 42
About Jars 42
Adding Jars 42
Accessing Jars 42
About Lists of Values 43
Adding a LOV 43
Using the Registered LOV in a Custom Task 44
Editing a LOV 44
Deleting a LOV 45
About Context Mapping 45
Adding a Context Mapping 45
Editing a Context Mapping 47
Deleting a Context Mapping 48
About Tabular Reports 48
Adding a Tabular Report 48
Using a Tabular Report in a Custom Workflow Task 50
Editing a Tabular Report 51
Deleting a Tabular Report 52
Exporting Script Modules 52
Importing Script Modules 53
Importing a Workflow 55
Exporting a Workflow as an Image 56
Renaming Workflows 56
Cisco UCS Director Orchestration Guide, Release 5.3
iv
Beta Draft
Contents
CHAPTER 5
Executing Workflows 57
Executing Workflows 57
Accessing Service Requests 57
Resubmitting a Failed Service Request 58
Using the Execute Now Action 58
Using a VM Action Policy 59
Using a Trigger 60
Adding Conditional Processing to Workflows 61
Adding an If-Else Logical Branch 62
Adding Loops 64
Adding Switch Operations 66
Context Workflow Mapping 67
Stage 1: Create a Context Mapper Task 68
Stage 2: Adding to the Workflow to the Content Mapper 68
Scheduling Workflows 69
Rolling Back Workflows 70
Viewing Workflow Assets (Created or Modified) 71
Validating Workflows 71
Resolving Workflow Validation Issues 71
Workflow Versioning 72
Creating Workflow Versions 72
Managing Workflow Versions 73
Managing Versions of a Compound Task 73
CHAPTER 6
Managing Activities 77
Using Activities 77
Adding an Activity 78
Associating an Activity with a Workflow 79
Adding an Activity to a Workflow 80
Exporting an Activity 82
Importing an Activity 82
Deleting an Activity 83
Example: Onboarding Tenants using an Activity 83
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
v
Contents
CHAPTER 7
Using Macros 85
About VM Name Template Customization 85
Using the VM Name Template 85
About VM Template and Hostname Variables 87
About Application Codes 87
About Macro Orchestration 88
Cisco UCS Director Orchestration Guide, Release 5.3
vi
Beta Draft
Preface
This preface contains the following sections:
• Audience, page vii
• Conventions, page vii
• Related Documentation, page ix
• Documentation Feedback, page ix
• Obtaining Documentation and Submitting a Service Request, page ix
Audience
This guide is intended primarily for data center administrators who use Cisco UCS Director and who have
responsibilities and expertise in one or more of the following:
• Server administration
• Storage administration
• Network administration
• Network security
• Virtualization and virtual machines
Conventions
Text Type
Indication
GUI elements
GUI elements such as tab titles, area names, and field labels appear in this font.
Main titles such as window, dialog box, and wizard titles appear in this font.
Document titles
Document titles appear in this font.
TUI elements
In a Text-based User Interface, text the system displays appears in this font.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
vii
Preface
Conventions
Text Type
Indication
System output
Terminal sessions and information that the system displays appear in this
font.
CLI commands
CLI command keywords appear in this font.
Variables in a CLI command appear in this font.
Note
Tip
[]
Elements in square brackets are optional.
{x | y | z}
Required alternative keywords are grouped in braces and separated by vertical
bars.
[x | y | z]
Optional alternative keywords are grouped in brackets and separated by vertical
bars.
string
A nonquoted set of characters. Do not use quotation marks around the string or
the string will include the quotation marks.
<>
Nonprinting characters such as passwords are in angle brackets.
[]
Default responses to system prompts are in square brackets.
!, #
An exclamation point (!) or a pound sign (#) at the beginning of a line of code
indicates a comment line.
Means reader take note. Notes contain helpful suggestions or references to material not covered in the
document.
Means the following information will help you solve a problem. The tips information might not be
troubleshooting or even an action, but could be useful information, similar to a Timesaver.
Caution
Means reader be careful. In this situation, you might perform an action that could result in equipment
damage or loss of data.
Timesaver
Means the described action saves time. You can save time by performing the action described in the
paragraph.
Cisco UCS Director Orchestration Guide, Release 5.3
viii
Beta Draft
Preface
Related Documentation
Warning
IMPORTANT SAFETY INSTRUCTIONS
This warning symbol means danger. You are in a situation that could cause bodily injury. Before you
work on any equipment, be aware of the hazards involved with electrical circuitry and be familiar with
standard practices for preventing accidents. Use the statement number provided at the end of each warning
to locate its translation in the translated safety warnings that accompanied this device.
SAVE THESE INSTRUCTIONS
Related Documentation
Cisco UCS Director Documentation Roadmap
For a complete list of Cisco UCS Director documentation, see the Cisco UCS Director Documentation
Roadmap available at the following URL: http://www.cisco.com/en/US/docs/unified_computing/ucs/
ucs-director/doc-roadmap/b_UCSDirectorDocRoadmap.html.
Cisco UCS Documentation Roadmaps
For a complete list of all B-Series documentation, see the Cisco UCS B-Series Servers Documentation Roadmap
available at the following URL: http://www.cisco.com/go/unifiedcomputing/b-series-doc.
For a complete list of all C-Series documentation, see the Cisco UCS C-Series Servers Documentation Roadmap
available at the following URL: http://www.cisco.com/go/unifiedcomputing/c-series-doc.
Note
The Cisco UCS B-Series Servers Documentation Roadmap includes links to documentation for Cisco
UCS Manager and Cisco UCS Central. The Cisco UCS C-Series Servers Documentation Roadmap includes
links to documentation for Cisco Integrated Management Controller.
Documentation Feedback
To provide technical feedback on this document, or to report an error or omission, please send your comments
to [email protected]. We appreciate your feedback.
Obtaining Documentation and Submitting a Service Request
For information on obtaining documentation, using the Cisco Bug Search Tool (BST), submitting a service
request, and gathering additional information, see What's New in Cisco Product Documentation, at: http://
www.cisco.com/c/en/us/td/docs/general/whatsnew/whatsnew.html.
Subscribe to What's New in Cisco Product Documentation, which lists all new and revised Cisco technical
documentation as an RSS feed and delivers content directly to your desktop using a reader application. The
RSS feeds are a free service.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
ix
Preface
Obtaining Documentation and Submitting a Service Request
Cisco UCS Director Orchestration Guide, Release 5.3
x
Beta Draft
CHAPTER
1
New and Changed Information
This chapter contains the following sections:
• New and Changed Information, page 1
New and Changed Information
The following table provides an overview of the significant changes to this guide for this current release. The
table does not provide an exhaustive list of all changes made to this guide or of all new features in this release.
Table 1: New and Changed Information for Release 5.3
Feature
Description
Where Documented
Select a subtask on
resubmission of a service
request.
Allows the user to resubmit a Resubmitting a Failed Service Request, on
service request starting at any page 58
child task (including
compound workflows) within
the SR workflow. The SR can
be resubmitted from a task at
any depth in a compound task
hierarchy.
Select and deselect child
Service Request objects for
rollback
Allows the user to select or Rolling Back Workflows, on page 70
deselect objects in child
workflows when rolling back
a service request. Objects can
be selected and deselected at
any depth in a compound task
hierarchy.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
1
New and Changed Information
New and Changed Information
Feature
Description
Where Documented
Script Module: Context
Mapping
You can dynamically add a
About Context Mapping, on page 45.
Context Workflow Mapping.
The Context Workflow
Mapping creates an action
label for a report, and assigns
a workflow to that action
label.
Script Module: Lists of
Values
You can create Lists of
About Lists of Values, on page 43
Values (LOVs) to allow users
of workflows to present a
predefined set of options for
a user input.
Script Module: Tabular
Reports
You can create Tabular
Reports to allow users of
workflows to provide a
predefined set of values for
input to custom workflows.
About Tabular Reports, on page 48
Managing Versions of a
Compound Task
Clarifies the behavior of
different versions of a
workflow used as a
compound task in another
workflow.
Managing Versions of a Compound Task, on
page 73
Compound task: suppress task When creating a compound Creating a Compound Task, on page 22
output by default.
task, you can choose to
expose the outputs of
intermediate tasks as outputs
of the compound task. By
default, only the workflow
outputs are exposed as
outputs of the compound task.
Cisco UCS Director Orchestration Guide, Release 5.3
2
Beta Draft
CHAPTER
2
Overview
This chapter contains the following sections:
• About Orchestrator, page 3
About Orchestrator
The Cisco UCS Director Orchestrator allows IT administrators to enable cloud automation and standardize
IT services. As an administrator, you can use Orchestrator to execute a set of tasks such as VM creation or
VM power action, but in a workflow format. You can add or move tasks to a workflow and then execute your
final workflow. All of the tasks are executed in serial fashion, one right after another. The Cisco UCS Director
Orchestration Guide contains procedures for the following topics:
• Workflows
• Workflow lifecycle management
• Task definitions (including simple and compound tasks)
• Triggers
• Action policies
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
3
Overview
About Orchestrator
Cisco UCS Director Orchestration Guide, Release 5.3
4
Beta Draft
CHAPTER
3
Understanding Workflows
This chapter contains the following sections:
• About Workflows, page 5
• Workflow Designer, page 5
• Predefined Tasks, page 7
About Workflows
Cisco UCS Director Orchestrator allows you to organize workflows so that you can automate simple or
complex actions on your infrastructure (either physical or virtual). By using Orchestrator you can organize
tasks into distinct workflows to accomplish specific IT services, such as adding VMs. You can then add
multiple tasks to a workflow is accomplished using the workflow UI designer. Triggers help initiate actions
inside a workflow. You can execute the workflow directory or have a trigger begin the process. A typical
workflow consists of the following elements:
• Workflow Designer (GUI interface)
• Predefined Tasks
The simplest workflow consists of two connected tasks. A task represents a particular action or operation.
The workflow determines the order in which your tasks are executed by Orchestrator. When constructing
workflows, by dragging-and-dropping tasks, it is possible to route the output of one workflow into the input
of another workflow. This connecting of multiple tasks is how you create more complex workflows.
Workflow Designer
You use the workflow designer to implement actions or to select tasks from a list and then drag and drop them
onto your Workflow Designer pane.
Workflow Life Cycle Editing Actions
Common workflow editing actions are as follows:
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
5
Understanding Workflows
Workflow Life Cycle Editing Actions
Name
Description
Add Workflow
Adds a new workflow.
Import Workflow
Imports a workflow to other sources.
Export Workflow
Exports a workflow from Cisco UCS Director.
Clone Workflow
Clones selected workflows.
Edit Workflow
Edits a selected workflow.
Delete Workflow
Deletes a selected workflow.
Workflow Designer
Opens the workflow designer for a selected workflow.
Export as Template
Exports the selected workflow as a template.
Execute Now
Executes the selected workflow.
Schedule
Schedules a workflow.
Lock/Unlock Workflow
Locks a workflow to prevent any modifications. Once
locked, the workflow cannot be deleted or unlocked.
Workflow Designer Window (Full View)
Provides a full view button at the top, which displays
the entire workflow in one window. To magnify a
portion of the workflow move your cursor over a
workflow segment.
The Workflow Designer viewing options are as follows:
Name
Description
Edit Workflow Properties
Modifies existing workflow properties from within
the Workflow Designer pane.
Compact View Mode
Displays the workflow task list in compact view in
order to display a large number of tasks without
having to scroll through your display.
Auto Layout
Formats the task icons within the Workflow Designer
to a linear design.
Validate Workflow
Checks if the tasks, their input mappings and their
connections are valid or not.
Execute Now
Executes (runs) the existing workflow.
Cisco UCS Director Orchestration Guide, Release 5.3
6
Beta Draft
Understanding Workflows
Predefined Tasks
Predefined Tasks
A predefined task is a specific action or operation that has inputs and outputs. Orchestrator uses several
predefined tasks for compute, storage and network functions in both virtual and physical infrastructures. The
predefined tasks can be grouped together and used as inputs to other pre-defined tasks.
Name
Description
SSH Command task
Executes a command in a secure shell (SSH) session.
Collect Inventory task
Collects inventory collection task for available
devices.
Execute Cloupia Script task
Execute a script within a workflow.
Notify URL task
Notifies the specified URL.
Accessing Task Documentation
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Orchestration.
Click the Task Library icon.
Check the Regenerate document check box to view a list of all new tasks and those by open automation.
Click Submit.
The orchestration task library appears. Click on an entry to see more information about specific inputs and outputs that
are available.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
7
Understanding Workflows
Accessing Task Documentation
Cisco UCS Director Orchestration Guide, Release 5.3
8
Beta Draft
CHAPTER
4
Creating Workflows
This chapter contains the following sections:
• Creating Workflows, page 9
• Creating a Compound Task, page 22
• Custom Approval Tasks, page 24
• Using Script Modules, page 40
• Importing a Workflow, page 55
• Exporting a Workflow as an Image, page 56
• Renaming Workflows, page 56
Creating Workflows
Cisco UCS Director Orchestrator allows you to create workflows of both common and custom IT administration
tasks. Many of the common tasks are accessed using the following tabs.
The Workflows tab provides the following actions:
Name
Description
Refresh
Refreshes the display.
Favorite
Favorite the current page.
Add Workflow
Adds a new workflow.
Import
Imports a workflow from other sources.
Export
Exports a workflow.
Task Library
Accesses documentation on tasks.
Edit Workflow
Edits an existing workflow.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
9
Creating Workflows
Creating a Workflow
Name
Description
Clone Workflow
Clones an existing workflow.
Delete Workflow
Deletes an existing workflow (if it is not locked).
Execute now
Executes a valid workflow.
Display Workflow
Displays the currently selected workflow.
Workflow Designer
Accesses the Workflow Designer pane.
Export As Template
Exports the selected workflow as a template.
Schedule
Schedules a workflow (execution).
Lock/Unlock Workflow
Locks or unlocks the currently selected workflow.
Validate Workflow
Validates the currently selected workflow.
Manage Versions
Manages the versions for the selected workflow.
Create New Version
Creates a new version for the currently selected
workflow.
Creating a Workflow
Before you can begin creating one or more tasks, you must create a basic workflow.
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Orchestration.
Choose the Workflow tab.
Click Add Workflow.
In the Add Workflow screen, complete the following fields:
Name
Description
Workflow Name field
The workflow name.
Note
Workflow names cannot contain the following
characters: \"%&'*+,./:;<=>?^|
Description field
The description of the workflow.
Cisco UCS Director Orchestration Guide, Release 5.3
10
Beta Draft
Creating Workflows
Creating a Workflow
Name
Description
Workflow Context drop-down list
The workflow context. Orchestrator supports the following
options:
• Any --- Enables you to use the workflow in any
context.
• Selected VM --- Enables you to use the execute the
workflow only when you choose a VM.
Save as Compound Task check box
Check the check box to define the workflow as a compound
task.
Place in New Folder check box
Check the check box to assign the workflow to a new
folder.
Select Folder drop-down list
Choose the proper folder.
Notify status of execution to initiating user checkbox
Check the checkbox to notify the user via email of the status
of execution of the workflow. If checked, enter the
additional email addresses in the Additional User(s) to
send Email Notification field. The status of execution for
the workflow can be one of the following:
• Completed status
• Failed execution status
• Cancelled execution status
Step 5
Step 6
Click Next.
In the Add User Inputs screen, Click the + icon to add additional user inputs.
Step 7
In the Add Entry to screen, complete the following fields:
Name
Description
Input Label field
The label assigned to the input.
Input Description field
The description of the input.
Input Type field
The type of input category. During the editing and saving
of a workflow task, the Input Type field is no longer
editable.
Admin Input List field
The current administrator's list of inputs. The existing list
cannot be changed. However, the order of the new inputs
can be changed ( for example, the grid that displays all of
the input fields).
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
11
Creating Workflows
User Input Optionality
Name
Description
Admin Input Filter field
The administrator's input filter values is used to define
custom inputs based on a filter (static or dynamic). For
example, you can filter on aggregate, volumes and pods.
Optional checkbox
If checked, marks the input as optional at the time of
workflow execution.
Input Type field
The type of input.
Step 8
Step 9
Click Next.
In the Add User Outputs screen, verify the user outputs displayed. Click the + icon to add more user outputs.
Step 10
Click Submit.
User Input Optionality
By default, user inputs are mandatory when creating or editing a new or existing workflow. However, you
can elect to make a task optional at the time of workflow execution.
Note
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Step 8
Step 9
Step 10
Step 11
You cannot map an optional workflow input to a mandatory task input (attribute). A mismatch error will
be displayed during the User Input Mapping stage.
On the menu bar, choose Policies > Orchestration.
Open the Workflows folder.
Click on a task.
Click Edit Workflow. The Edit Workflow screen appears.
Click Next in order to access the Modify User Inputs screen.
Click on an input that you want to edit in the inputs table. The Edit Entry dialog box appears.
Check the Optional checkbox in order to make this input optional (at the time of execution).
Note
The initial workflow input is now re-mapped as a task
input.
Click Submit .
Click Ok.
Click Submit.
Click Ok.
Cisco UCS Director Orchestration Guide, Release 5.3
12
Beta Draft
Creating Workflows
Filter Criteria Syntax for Admin Input Filter
Filter Criteria Syntax for Admin Input Filter
At various points in creating your workflow you can use filters to help you refine the selection of data. When
working with the Admin Input Filter parameter you can enter values in the Input Filter Criteria field to
further enhance your workflow development. The filter syntax is best used when you have a large number of
inputs. For example, if you have a workflow task that works on certain VMs and there are over 1000 VMs in
your Cisco UCS Director installation, using this filter lets you highlight only the VMs that are applicable to
your workflow development. With the Admin Input Filter option you can apply filters on a VM, which exists
on a particular cloud account, then you can filter the data on that cloud account (and listed in a table) and
receive only the VMs that belong to that specific cloud account.
In another example, in constructing workflows you enter information into the Admin Input Filter field. Using
this filter you can, as described above, filter for required VMs from a particular cloud account. In actuality,
this filtered list of VMs only appears when you execute the workflow. So while you define the filter criteria
early in the workflow design stage, the actual lists of VMs are displayed for selection only when the workflow
is executed.
Filtering for Tabular Type Data Types
The filtering for all tabular type data types (general) command syntax and example are shown below:
<column label>EQUALS|NOT_EQUALS|CONTAINS|NOT_CONTAINS|IS_SUBSET|NOT_SUBSET<value1> OR <simple
match
regex> OR <value n> AND <column
label>EQUALS|NOT_EQUALS|CONTAINS|NOT_CONTAINS|IS_SUBSET|NOT_SUBSET<value1>OR<value2>OR<value
n>
For example, if you want to match a VM's name, testvm, the only valid regular expression possible are either
test* or *vm. No other combinations are possible. In this case, the match is considered a greedy match
(appearing at the beginning or ending of a regular expressions).
Note
The command syntax used in your workflows do not support standard UNIX regular expressions.
Example Syntax
cloud CONTAINS vcenter OR vcenter98 AND power status EQUALS OFF OR "not determined"
The "AND" join condition applies filtering on the already filtered rows. AND acts like a cascading filter. The
first part of the expression searches for all the rows in the VM selector table for the column named cloud. It
also checks for the presence of the string named vcenter or vcenter98.
The second part of the expression searches the resultant rows from the previous expression. It also searches
for the presence of the string named off or "not determined".
The corresponding row of data is displayed for user of the workflow only when conditions 1 and 2 match due
to the presence of the and condition (placed between conditions 1 and 2). If the keyword to be searched is
entered within quotes, its searched against the exact case.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
13
Creating Workflows
Filter Criteria Syntax for Admin Input Filter
Note
You cannot use the OR condition between condition 1 and condition 2. You must use AND when combining
the conditions between columns and use the OR condition for filtering data in a column. Also, if you want
to search a column label (containing two or more words), the words must be enclosed in double quotes.
The filtering conditions must use the exact case or else the filtering values are ignored.
Filtering for List of Values (LOV) Data Types
LOV types use only single values, in order to filter on those values you just need to mention the condition.
The filtering syntax for all List of View (LOV) data types command syntax is shown below:
EQUALS|NOT_EQUALS|CONTAINS|NOT_CONTAINS <value1>
OR <simple match regex> OR <value n>
Example Syntax
EQUALS off OR "not determined"
The above command syntax executes the workflow and displays a filtered list of the LOVs. If the keyword
to be searched is entered within quotes, its searched against the exact case.
Filtering for Numeric Data
Certain numeric data such as disk size, LUN size, volume size are specified by units -- megabytes(MB),
gigabytes(GB) and terabytes(TB). When you use the filter criteria described in Filtering for Tabular Type
Data Types, on page 13 and Filtering for Tabular Type Data Types, on page 13, you must specify the
numeric value and its units in the command syntax. For example, if you have a workflow task that requires
80 GB for disk size, in the command syntax, you must specify the unit GB in addition to the numeric value
of 80. You will see incorrect results upon workflow execution if you do not specify the units.
Example Syntax
"EQUALS'80 GB'"
Adding Tasks to a Workflow
Orchestrator contains a set of predefined tasks that you can readily use to create workflows. Tasks are
categorized based on their functionality and can be accessed from the Workflow Designer interface.
Step 1
From the Orchestrator window, choose a workflow.
Step 2
Click Workflow Designer. The Workflow Designer window appears.
Step 3
On the left-side of the Workflow Designer, select a category and click the Available Tasksfolder.
Step 4
Click on a required task and drag-and-drop the selected task onto the Workflow Designer window.
Cisco UCS Director Orchestration Guide, Release 5.3
14
Beta Draft
Creating Workflows
Filter Criteria Syntax for Admin Input Filter
Adding a Create VM Snapshot Action to the Workflow
Note
In this task you provide the VM Name at the time of workflow execution.
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration.
Click the Workflows tab.
From the Workflow Designer window, drag-and-drop the Create a VM Snapshot task to the Workflow Designer window.
Step 4
In the Workflow Task Basic Information screen complete the following fields:
Step 5
Step 6
Name
Description
Task Name field
The name of the task.
Task Category field
The name of the category task (preselected information).
Task Type field
The name of the type of task (preselected information).
Comments field
The area to enter additional task information.
Retry Execution check box
The Retry Execution check box to retry a task (at a later
time) if the task fails. This is useful when the state of a
resource is not available and a retrial of the task depends
on the state.
Retry Count drop-down list
Choose the number of attempts to perform a retry.
Retry Frequency drop-down list
Choose the amount of time between the attempts at a retry.
The workflow pauses until the task is retried n times on
failure or until it succeeds before it can continue with the
next task or completion of the workflow.
Click Next.
In the User Input Mapping to Task Input Attributes screen, complete the following fields:
Name
Description
Select VM: Map to User Inputcheck box
Check the check box to ensure inputs are prompted during
workflow execution (unless specified by the administrator
in the workflow definition).
Name of the User Input drop-down list
Choose the name of the user input.
Snapshot Name: Map to User Inputcheck box
Check the checkbox to ensure inputs are prompted during
workflow execution (unless specified by the administrator
in the workflow definition).
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
15
Creating Workflows
Filter Criteria Syntax for Admin Input Filter
Note
Step 7
Step 8
If you do not have any inputs mapped, you must provide those inputs need to be provided in the next screen.
Step 9
Click Next.
Complete the following fields:
Name
Description
Revalidate icon
Click the Revalidate icon to revalidate the current values.
Snapshot Name field
The name of the snapshot
Snapshot Memory checkbox
Check the check box to enable snapshot memory to capture
the memory of the VM.
Quiesce Filesystem check box
Check the check box to pause running processes on the
guest operating system so that file system contents are in
a known consistent state when a snapshot is taken.
Click Submit.
Adding a Resize VM Disk Action to the Workflow
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration.
Click the Workflows tab.
From the Available Tasks pane, drag-and-drop the Resize VM Disk task to the Workflow Designer window.
Step 4
In the Workflow Task Basic Information screen, complete the following information:
Name
Description
Task Name field
The name of the task.
Task Category field
The name of the category task (preselected information).
Task Type field
The name of the type of task (preselected information).
Comments field
The area to enter additional task information.
Retry Execution check box
The Retry Execution checkbox lets you retry a task (at a
later time) if the task fails. This is useful when the state of
a resource is not available and a retrial of the task depends
on the state.
Cisco UCS Director Orchestration Guide, Release 5.3
16
Beta Draft
Creating Workflows
Linking Tasks
Step 5
Step 6
Name
Description
Retry Count drop-down list
The number of attempts to perform a retry.
Retry Frequency drop-down list
The duration between the attempts at a retry. The workflow
pauses until the task is retried n times on failure or until it
succeeds before it can continue with the next task or
completion of the workflow.
Click Next.
In the User Input Mapping to Task Input Attributes screen, complete the following fields:
Name
Description
Select VM: Map to User Input check box
Check the check box to ensure inputs are prompted during
workflow execution (unless specified by the administrator
in the workflow definition).
Name of the User Input drop-down list
Choose the name of the user input.
New Disk Size (GB) check box
Check the checkbox to map user input to the new disk size.
If you do not have any inputs mapped, then those inputs need to be provided in the next screen. In the above
task you must select the VM that needs to be resized and provide a new value (GB) for the resizing.
Click Next.
In the User Input Mapping screen, complete the following fields:
Note
Step 7
Step 8
Step 9
Name
Description
Revalidate icon
Click the icon to revalidate the current values.
New Disk Size (GB) field
The size of the disk (GB).
Click Submit.
Linking Tasks
Linking tasks is required in order to assemble a complete workflow. Some elements of workflow construction
are automatically. For example, every workflow has the following three task icons added by default:
• Start task icon (blue)
• Completed (Success) task icon (green)
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
17
Creating Workflows
Linking Tasks
• Completed (Failure) task icon (red)
Tasks need to be linked to each other in the required flow. Every task has both the success (green) and failure
(red) options embedded with them. The entire process begins by creating a new workflow.
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Orchestration.
Choose the Workflows tab.
Click Add New Workflow.
In the Add Workflow screen, complete the following fields.
Name
Description
Workflow Name field
The workflow name.
Description field
The description of the workflow.
Workflow Context from the drop-down list
The workflow context. Orchestrator supports the following
options:
• Any. Any lets the workflow be used in any context.
• Selected VM. Lets the workflow be executed only
when a VM is selected.
Save as Compound Task checkbox
Defines the workflow as a compound task.
Place in New Folder checkbox
Assigns the workflow to a new folder.
Select Folder drop-down list
Choose the proper folder from the drop-down list.
Cisco UCS Director Orchestration Guide, Release 5.3
18
Beta Draft
Creating Workflows
Exporting Workflows as Templates
Step 5
Step 6
Step 7
Step 8
Step 9
Step 10
Step 11
Step 12
Step 13
Step 14
Step 15
Click Next.
In the Edit Workflow: Add User Inputs screen, complete the following fields:
Click Add User Inputs for any additional user inputs.
Click Submit. An empty workflow is created.
From inside the Workflow Designer pane, place your cursor on the Start task icon. A portion of the task icon is
highlighted green or red.
From the Available Task pane drag-and-drop a task (for example, CreateClusterServer task icon) onto the Workflow
Designer page.
From the Available Task pane drag-and-drop the CreateClusterLogicalInterface_2167 task icon onto the Workflow
Designer page.
Click on the green portion of the Start task icon and drag your cursor to the first task (for example, CreateClusterServer
task icon). A link is established. When this task is successful, the workflow grows in functionality. Do this step for all
tasks of a workflow (both success and failure).
Click on the red portion of the Start task icon and drag your cursor to the Completed (Failed) task icon.
On the CreateClusterLogicalInterface task icon move your cursor over the red area (right-side) and drag to the
Completed (Failed) task icon.
Click Validate Workflow.
Exporting Workflows as Templates
Workflows utilized often can be exported as templates for use in different administrative scenarios. When
you export a template, all of the tasks within the workflow are retained. A template can be imported into
another Cisco UCS Director environment and used as a workflow as well. When you create a new workflow
using a template, the inputs within the tasks that were mapped cannot be modified. However, you can modify
the inputs which were not mapped can be modified.
Creating a Template from a Workflow
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Orchestration. The Orchestration window appears.
Choose the Workflows tab.
Choose a workflow and click Export As Template.
In the Export as Template screen, complete the following fields:
Name
Description
Template Name field
The name for the template.
Description field
The description for the template.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
19
Creating Workflows
Exporting Workflows as Templates
Step 5
Click Submit.
Creating a Workflow from a Template
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration.
Choose the Templates tab.
Choose a template and click Create Workflow.
Orchestrator supports importing and using predefined templates. The templates are available under the Workflow
Templates tab and can be used to create new workflows. You can complete the following templates:
Name
Purpose
Customer Onboarding template Workflow for customer onboarding (secure
multitenancy)
Description
Workflow performs the
following:
• Creates a CUIC group
admin vDC
• Generates a VLAN from
the selected VLAN policy
• Creates a VLAN on the
selected Cisco Nexus 5000
Series switches
• Creates a port profile on
selected Nexus 1000v
Series switches
• Creates a VLAN interface,
creates flexible volume,
creates and establishes
vFiler on the controller,
and mounts the storage as
a datastore on a selected
host node
Cisco UCS Director Orchestration Guide, Release 5.3
20
Beta Draft
Creating Workflows
Exporting Workflows as Templates
Name
Purpose
Description
Deploy ESXi Host template
Workflow deploys a new blade as an ESXi Host
on VMware (vCenter) account
Workflow performs the
following:
• Creates a service profile
• Associates service profile
to a selected server
• Configures SAN zone(s)
on a Cisco Nexus 5000
Series switch
• Establishes a PXE boot
• Monitors PXE booting and
registers the host with a
selected VMware (vCenter)
account
Deploy ESXi Host with
ONTAP template
Workflow deploys a new blade as an ESXi Host
on VMware (vCenter) account.
Workflow performs the
following:
• Creates a service profile
• Associates a service profile
to a selected server
• Configures SAN zone(s)
on Cisco Nexus 5000
Series switch
• Establishes a PXE boot
• Monitors PXE booting and
registers the host with a
selected VMware (vCenter)
account
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
21
Creating Workflows
Creating a Compound Task
Name
Purpose
Deploy ESXi Host of Local
Workflow deploys a new blade as an ESXi host
Storage (without a Cisco Nexus of local Storage (without using a Cisco Nexus
1000v Series switch) template 1000v Series switch) on VMware (vCenter)
account
Description
Workflow performs the
following:
• Creates a service profile
• Associates service profile
to a selected server
• Configures SAN Zone(s)
on Cisco Nexus 5000
Series switch
• Establishes a PXE boot
• Monitors PXE booting and
registers the host with a
selected VMware (vCenter)
account
Attache VLAN to Storage
Controller template
Workflow attaches NetApp storage controller's
Ethernet ports to a new VLAN
Workflow performs the
following:
• Generates a VLAN from
the selected VLAN policy
• Creates a VLAN on the
selected devices
• Creates a VLAN interface
• Creates vFiler on the
controller
Creating a Compound Task
A compound task is a collection of multiple tasks. Compound tasks allow you to perform complex workflows.
Compound tasks comprise a single task that contain multiple tasks (embedded tasks). You can define a simple
Cisco UCS Director Orchestration Guide, Release 5.3
22
Beta Draft
Creating Workflows
Creating a Compound Task
workflow and save it as a compound task. Later, you can define another workflow and use the compound task
as part of the new workflow. You can use this pattern to define increasingly more complex workflows.
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Orchestration.
Choose the Workflow tab.
Click Add New Work Flow.
In the Workflow Details screen, complete the following fields:
Name
Description
Workflow Name field
The workflow name.
Description field
The description of the workflow.
Workflow Context drop-down list
Choose the workflow context. Orchestrator supports the
following options:
• Any-Allows the workflow be used in any context.
• Selected VM -Allows the workflow be executed only
when a VM is selected.
Save as Compound Task check box
Check this check box to save the workflow as a compound
task.
Publish Task outputs as Compound Task outputs check This check box appears if you choose the Save as
box
Compound Task check box.
Check this check box to expose all the task outputs as
outputs of the compound task. Leaving the box unchecked
suppresses the outputs of the included tasks so that the
compound task exposes only the workflow outputs.
Always execute during System initialization check box Check this check box to execute the workflow as part of
the startup sequence when Cisco UCS Director is
initialized.
Note
Step 5
Step 6
Because the workflow is executed before the Cisco
UCS Director GUI starts, workflows that require
user input cannot be executed at system startup.
Place in New Folder check box
Check the check box to assign the workflow to a new
folder. The folder is created when the workflow is saved.
Folder Name field
The name of folder.
Click Next.
In the Add User Inputs screen, complete the following fields:
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
23
Creating Workflows
Custom Approval Tasks
Name
Description
Input Label field
The label assigned to the input.
Input Description field
The description of the input.
Input Type field
The type of category.
Admin Input field
The area that allows the administrator to provide the input.
The administrator provides input based on the input type.
The inputs are not required to be provided by the end user
who executes the workflow. The administrator can prevent
an end user from providing certain types.
Admin Input List field
The current administrator's list of inputs. The existing list
cannot be changed. However, the order of the new inputs
can be changed (for example, the grid that displays all of
the input fields).The hard limit for the Admin Input List
field is 256 values.
Admin Input Filter field
The administrator's input filter value used to define custom
inputs based on a filter (static or d dynamic). For example,
you can filter on aggregate, volumes, and POD.
Step 7
Step 8
Step 9
Click Add User Inputs for any additional user inputs.
Click Next.
In the Add User Outputs screen, verify the user outputs displayed. Click the + icon to add more user outputs.
Step 10
Click Submit.
The Workflow Designer window appears.
What to Do Next
Define the functionality of the custom task by constructing a workflow in the Workflow Designer.
Custom Approval Tasks
You can provision workflows to accept approvals using the Custom Approval Tasks feature, which allows
the infrastructure administrators (compute, storage and network) or any type of system user to provide inputs
for the execution of workflows.
Custom approval tasks let specific users approve a workflow before it can be executed. The approver's name
is requested when adding this task to a workflow. The same individuals can also provide inputs that were
previously defined in the custom approval task. After those approval tasks are defined, they can be added to
the workflow. Next, you are prompted to enter the name of the approver of the task. When the workflow is
executed, it pauses at the approval task. An approver can see this approval designation under the Approvals
Cisco UCS Director Orchestration Guide, Release 5.3
24
Beta Draft
Creating Workflows
Creating a Custom Approval Task
tab. The approver provides any needed inputs (which can be mapped to subsequent tasks) that were previously
configured. After a workflow is approved, the workflow resumes execution.
Creating a Custom Approval Task
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Orchestration.
Choose the Custom Approval Tasks tab.
Click Add.
In the Add Inputs screen, complete the following fields:
Step 5
Name
Description
Add Input field
The inputs to the custom approval task. Every input added
to this task needs to be provided by the user who approves
the workflow containing this approval task.
Approval Task Name field
The name of the approval task as it appears in the Workflow
Designer.
Approval Task Description field
The description of the approval task.
Input Label field
The label for the input (supplied by the approver of the
task).
Input Description field
The description of the input.
Input Type field
The category of the input (supplied by the approver of the
task).
(Optional) Input check box
If checked, requires the administrator to provide input.
Once checked the administrator needs to provide the input
based on the input type. The approver of the task is not
required to provide input.
Click Submit.
Adding a Custom Approval Task to a Workflow
Adding a custom approval task to a workflow is similar to adding any other task to a workflow. In the User
Input Mapping stage of the task creation, you can determine if an approver is required to approve this workflow
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
25
Creating Workflows
Custom Input Value
at the time of execution. If approval is not required at the time of execution, Orchestrator prompts you for the
name of the approver at the Task Inputs stage of the process.
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Step 8
Step 9
On the menu bar, choose Policies > Orchestration.
Choose the Workflows tab.
Choose a workflow to add the custom approval task from the Available Tasks pane. The Workflow Designer page
appears.
Drag the custom approval task from within the Custom Approval Tasks folder onto the Workflow Designer pane.
From the Custom Approval Tasks folder, drag a task onto the Workflow Designer pane.
In the Add Task screen, check the Map to User Input check box if the approver name needs to be provided during
execution of the workflow. Otherwise, you can provide the approver's name when you execute the workflow.
Click Next.
Enter the User ID.
Click Submit.
Custom Input Value
When you create custom input types, you can use them as workflow inputs. Custom input types can be defined
by providing a new list of values (for example, as a key or value tuple), specifying a filter criteria to filter out
values shown, or choosing a unique selection (set) of values.
Step 1
Step 2
Step 3
Step 4
On the menu bar, choosePolicies > Orchestration.
Click the Custom Workflow Inputs tab.
Click Add.
In the Add Custom Workflow Input screen, complete the following fields:
Name
Description
Custom Input Type Name field
The input name. For example, a corporate email address
could be used as a key value pair.
Cisco UCS Director Orchestration Guide, Release 5.3
26
Beta Draft
Creating Workflows
Custom Input Value
Name
Description
Input Type tabular pop-up
Choose a type of input. Based on what you choose for the
type of input you can use additional filters to further refine
your selection. These filters are check boxes that can be
one or more of the following:
• Input Filter
• Input List
• Input LOV
• Input Range
• Validated Input
Step 5
Step 6
Step 7
Step 8
Click the (+) Add icon.
In the Add Custom Workflow Input: Custom Input Details screen, complete the following fields:
Name
Description
Custom Input Type Name field
The input name. For example, a corporate email address
could be used as a key value pair.
Input Type drop-down list
Choose a type of input.
LOV Entries table
The current list of values. Not all input types require a
LOV. For some input types you can only do a selection or
specify a filter criteria.
Click (+) Add icon.
In the Add Entry to LOV Entries dialog box, complete the following fields:
Name
Description
Label field
The label that is exposed to the user.
Value field
The value that is hidden to the user.
The Label field and Value field descriptions should
match.
Click Submit to add it to the custom workflow types.
Click OK.
Click Submit.
Click OK to finalize the process. The new custom workflow input appears in the Custom Workflow Inputs list.
Note
Step 9
Step 10
Step 11
Step 12
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
27
Creating Workflows
Example: Creating a Custom Input Type by using a List of Values (LOV)
Example: Creating a Custom Input Type by using a List of Values (LOV)
The example below describes how to establish a list of values based on a password.
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Orchestration.
Click the Custom Workflow Inputs tab.
Click the (+) Add icon.
In the Add Custom Workflow Input screen, complete the following fields:
Name
Description
Custom Input Type Name field
The input name. For example, a corporate email address
could be used as a key value pair. Or the name could relate
to a device's login credentials (for example, device login
creds).
Input Type tabular pop-up
Choose a type of input. Based on what you choose for the
type of input you can use additional filters to further refine
your selection. These filters are check boxes that can be
one or more of the following:
• Input Filter
• Input List
• Input LOV
• Input Range
• Validated Input
Step 5
Click Select.... The Select screen displays.
Step 6
Step 7
Step 8
Step 9
Enter Password into the search field. A list of possible check boxes appears that make use of the word password.
Check the Password check box.
Click Select. The Custom Input Details screen appears.
Click the (+) Add icon. The Add Entry to LOV Entries screen appears, complete the following fields.
Name
Description
Label field
The label that is exposed to the user.
Value field
The value that is hidden to the user. Password entries are
not displayed.
Cisco UCS Director Orchestration Guide, Release 5.3
28
Beta Draft
Creating Workflows
Example: Creating a Custom Input Type by using a List of Values (LOV)
Step 10
Step 11
Step 12
Step 13
Step 14
Step 15
Step 16
Step 17
Step 18
Step 19
Step 20
Step 21
Step 22
Step 23
Step 24
Enter admin in the Label field.
Enter the password text in the Value field (not displayed).
Click Submit.
Click OK. The Custom Input Details screen appears, complete the following for the following fields.
Name
Description
Label field
The label that is exposed to the user.
Value field
The value that is hidden to the user. Password entries are
not displayed.
Enter root in the Label field.
Enter the password text in the Value field (not displayed).
Click Submit.
Click OK. The entries appear in the LOV Entries table.
Click the Add (+) icon. The Add Entry to LOV Entries screen appears, complete the following fields.
Name
Description
Label field
The label that is exposed to the user.
Value field
The value that is hidden to the user. Password entries are
not displayed.
Enter tech in the Label field.
Enter text in the Value field (not displayed).
Click Submit.
Click OK. The entries appear in the LOV Entries table.
Click Submit.
Click OK.
Note
The next stage is to add the custom input into the workflow. Refer to the Adding a Custom Input into a
Workflow topic.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
29
Creating Workflows
Example: Creating a Custom Input Type by using a List of Values (LOV)
Adding a Custom Input into a Workflow
Step 1
Step 2
On the menu bar, choose Policies > Orchestration.
Click the Workflows tab.
Step 3
Step 4
Click the Add Workflow icon.
In the Add Workflow: Workflow Details screen, complete the following fields:
Name
Description
Workflow Name field
The workflow name.
Description field
The description of the workflow.
Workflow Context drop-down list
The workflow context. Orchestrator supports the following
options:
• Any-Allows the workflow to be used in any context.
• Selected VM- Allows the workflow to be executed
only when a VM is selected.
Step 5
Step 6
Step 7
Step 8
Step 9
Step 10
Save as Compound Task check box
Check the check box to defines the workflow as a
compound task.
Place in New Folder check box
Check the check box to assign the workflow to a new
folder.
Select Folder drop-down list
Choose the proper folder.
Enter Device Creation in the Workflow name field.
Check the Place in New Folder check box.
Enter a name in the Folder Name field.
Click Next. The Workflow User Inputs screen appears.
Click the Add (+) icon.
In the Add Entry to dialog box appears, complete the following fields:
Name
Description
Input Label field
The input name. For example, a corporate email address could be used
as a key value pair. Or the name could relate to login credentials (for
example, root privileges).
Input Description field
The description of the input.
Input Type field
The type of input category.
Cisco UCS Director Orchestration Guide, Release 5.3
30
Beta Draft
Creating Workflows
Example: Establishing a List of Values Based on Filter Criteria
Name
Description
Admin Input checkbox
If checked, requires the administrator to provide input. Once checked
the administrator needs to provide the input based on the input type.
The approver of the task is not required to provide input.
Admin Input Filter check box
If checked, requires the administrator to provide input based on certain
filter criteria.
Admin Input List check box
If checked, provides the administrator access to previously created lists.
Step 11
Step 12
Step 13
Step 14
Step 15
Step 16
Step 17
Step 18
Step 19
Click Select....The Select dialog box appears.
Check the device login creds check box.
Click Select. The Add Entry dialog box appears.
In the Value Restrictions area, check the Admin Input check box.
From the Admin Input Value drop-down list choose root.
Click Submit.
Click OK.
In the Workflow User Inputs screen, click the Add Input (+) button. The Add Entry to dialog box appears.
In the Input Label field, enter tech privileges.
Step 20
Step 21
Step 22
Step 23
Step 24
Step 25
Step 26
Step 27
Step 28
Click Select.
In the Select dialog box, check the device login creds check box.
Click Select. The Add Entry dialog box appears.
In theValue Restrictions area, check the Admin Input check box.
From the Admin Input Value drop-down list, choose tech.
Click Submit.
Click OK.
Click Submit.
Click OK.
Example: Establishing a List of Values Based on Filter Criteria
The example below describes how to establish a list of values based on filter criteria.
Step 1
Step 2
Step 3
Step 4
On the menu bar, choosePolicies > Orchestration.
Click the Custom Workflow Inputs tab.
Click (+) Add icon.
In the Add Custom Workflow Input dialog box, complete the following fields:
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
31
Creating Workflows
Example: Establishing a List of Values Based on Filter Criteria
Step 5
Step 6
Name
Description
Custom Input Type Name field
The input name. For example, a corporate email address
could be used as a key value pair. Or the name could relate
to a device's login credentials (for example, device login
creds).
Input Type tabular pop-up
Choose a type of input.
Click Select.....
In the Select dialog box, complete the following fields:
Name
Description
Input Label field
The input label name. While defining custom inputs, you
can define inputs based on certain filter conditions. The
manner in which these conditions are to be defined is the
same manner you used when defining the filter conditions
for workflow inputs (using the Admin Input Filter option).
When you create a filtered list of custom inputs, the filtering
occurs while you are defining the custom inputs. When
you use custom inputs, while defining the workflow inputs,
you are choosing from a filtered list. For example, a
corporate email address could be used as a key value pair.
Or the name could relate to login credentials (for example,
root privileges).
Input Description field
The description of the input.
Input Type field
The type of input category.
Admin input check box
If checked, requires the administrator to provide input.
Once checked the administrator needs to provide the input
based on the input type. The approver of the task is not
required to provide input.
Admin Input Filter check box
If checked, requires the administrator to provide input based
on certain filter criteria.
Admin Input List check box
If checked, provides the administrator access to previously
created lists.
Cisco UCS Director Orchestration Guide, Release 5.3
32
Beta Draft
Creating Workflows
Example: Establishing a List of Values Based on Filter Criteria
Step 7
Step 8
Step 9
Step 10
Step 11
Step 12
Enter root privileges in the Input Label field.
Click Select.... The Select table appears.
Enter log in the Search field to identify login specific entries.
Check the device login creds check box.
Click Select.
The Add Entry to dialog box appears, complete the following fields:
Name
Description
Input Label field
The input name. For example, a corporate email address
could be used as a key value pair. Or the name could relate
to a device's login credentials (for example, device login
creds).
Input Description field
The input description.
Input Type field
The input type.
Admin input check box
If checked, requires the administrator to provide input.
Once checked the administrator needs to provide the input
based on the input type. The approver of the task is not
required to provide input.
Admin Input Filter check box
If checked, requires the administrator to provide input based
on certain filter criteria.
Admin Input List check box
If checked, provides the administrator access to previously
created lists.
Notice how the Input Label field is
prepopulated.
Check the Admin Input check box.
Click the Admin Input Value drop-down list to verify that the previous selections are visible (admin, root, and tech).
From the Admin Input Value drop-down list choose root.
Note
Step 13
Step 14
Step 15
Step 16
Step 17
Step 18
Click Submit. The entry is added successfully. The Workflow User Inputs screen appears.
Click the (+) Add icon.
The Add Entry to dialog box appears, complete the following:
Name
Description
Input Label field
The input name. For example, a corporate email address
could be used as a key value pair. Or the name could relate
to a device's login credentials (for example, device login
creds).
Input Description field
The input description.
Input Type field
The input type.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
33
Creating Workflows
Example: Establishing a List of Values Based on Filter Criteria
Step 19
Step 20
Step 21
Step 22
Step 23
Step 24
Name
Description
Admin Input check box
If checked, requires the administrator to provide input.
Once checked the administrator needs to provide the input
based on the input type. The approver of the task is not
required to provide input.
Admin Input Filter check box
If checked, requires the administrator to provide input based
on certain filter criteria.
Admin Input List check box
If checked, provides the administrator access to previously
created lists.
Enter tech privileges in the Input Label field.
Click Select... to choose an input type. The Select dialog box appears.
Enter cre in the Search field to identify the credentials related input types.
Check the device login creds check box.
Click Select.
The Add Entry dialog box appears, complete the following:
Name
Description
Input Label filed
The input name. For example, a corporate email address
could be used as a key value pair. Or the name could relate
to a device's login credentials (for example, device login
creds).
Input Description filed
The input description.
Input Type field
The input type.
Admin Input check box
If checked, requires the administrator to provide input.
Once checked the administrator needs to provide the input
based on the input type. The approver of the task is not
required to provide input.
Admin Input Filter check box
If checked, requires the administrator to provide input based
on certain filter criteria.
Admin Input List check box
If checked, provides the administrator access to previously
created lists.
Cisco UCS Director Orchestration Guide, Release 5.3
34
Beta Draft
Creating Workflows
Example: Creating a Custom Input Type by a Unique Selection
Step 25
Step 26
Step 27
Step 28
Step 29
Step 30
Check the Admin Input check box.
From the Admin Input Value drop-down list choose tech.
Click Submit.
Click OK.
From the Workflow User Inputs screen click Submit.
Click OK.
Example: Creating a Custom Input Type by a Unique Selection
The example below describes how to establish a list of values based on a unique selection (for example,
multiple VMs).
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration.
Click the Custom Workflow Inputs tab.
Choose the VM deployment list input.
Note
Notice that the Custom Values Filter field is prepopulated with search values.
Step 4
Step 5
In the Custom Input Type screen, uncheck the Input Filter check box.
Check the Input List check box.
Note
Notice that the Input Type field is prepopulated with the value
vm.
From the Tabular Values drop-down list, check one or more cloud entry check boxes.
Click Select.
From the Custom Input Details screen click Close.
Choose the Workflows tab.
Click the (+) Add Workflow icon. The Workflow Details screen appears.
In the Workflows Details screen, complete the following fields:
Step 6
Step 7
Step 8
Step 9
Step 10
Step 11
Name
Description
Workflow Name field
The workflow name.
Description field
The description of the workflow.
Workflow Context drop-down list
The workflow context. Orchestrator supports the following
options:
• Any-Allows the workflow to be used in any context.
• Selected VM- Allows the workflow to be executed
only when a VM is selected.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
35
Creating Workflows
Example: Creating a Custom Input Type by a Unique Selection
Step 12
Step 13
Name
Description
Save as Compound Task check box
Check the check box to defines the workflow as a
compound task.
Place in New Folder check box
Check the check box to assign the workflow to a new
folder.
Select Folder drop-down list
Choose the proper folder.
Click Next.
In the Add Entry screen, complete the following:
Name
Description
Input Label field
The input name. For example, a corporate email address
could be used as a key value pair. Or the name could relate
to a device's login credentials (for example, vm input).
Input Description field
The input description.
Input Type field
The input type.
Admin Input check box
If checked, requires the administrator to provide input.
Once checked the administrator needs to provide the input
based on the input type. The approver of the task is not
required to provide input.
Admin Input Filter check box
If checked, requires the administrator to provide input based
on certain filter criteria.
Admin Input List check box
If checked, provides the administrator access to previously
created lists.
Notice that the Admin Input check box is automatically
checked.
Click Submit.
Note
Step 14
Cisco UCS Director Orchestration Guide, Release 5.3
36
Beta Draft
Creating Workflows
Accessing the Input/Output Tab
Moving Inputs
After creating a workflow, you can change the order in which workflow user inputs are processed when the
workflow is executed.
Step 1
Step 2
Step 3
Step 4
In the Edit Workflow: Workflow User Inputs screen choose an input from the input table.
Click the (green) Up Arrow icon or Down Arrow icon to change the inputs original order.
Click Submit.
Click OK.
Accessing the Input/Output Tab
The input/output tab displays a listing of the values for a particular task (residing in a workflow) at the time
of approval. There are four variations of an input or output that may be visible:
• Administrator input
• Task input
• Output (of a particular task)
• Mapping (for example, SendEmail_94.EMAIL_ADDRESSES)
In the above mapping example, SendEmail_94.EMAIL_ADDRESSES is getting mapped to an input of another
task.
Step 1
Step 2
Step 3
On the menu bar, choose Organizations > Service Requests.
Click on a service request. The input/output table appears.
Click the Input/Output tab. The values of a particular task inside a workflow are accessible from this tab. The four
input/output variations, mentioned previously, appear in the Input/Output column.
Note
From the Input/Output tab you can also see the workflow, and in particular the output of a task (for example,
SendEmail_94.EMAIL_ADDRESSES). From this tab you can also view how an output may be mapped as an
input to another task in a workflow. The task status information in the Input/Output tab also mirrors the status
of the Workflow Status tab.
Accessing Outputs from a Previous Task
It is possible to access the output of previous task in your workflow (for example, in a SSH task). For referencing
the output value of a previous task, you should refer the full task output variable name as shown in the example
below:
{Associate AP.OUTPUT_UCS_BLADE_MAC_ADDRESS}
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
37
Creating Workflows
Cross Launching Workflow Inputs
Instead of:
{OUTPUT_UCS_BLADE_MAC_ADDRESS}
Cross Launching Workflow Inputs
You can create and cross launch workflow inputs while modifying or adding tasks.
Step 1
From the Workflow Designer pane, open an existing workflow (for example, AddServiceConsolePortGroup_322).
Step 2
Step 3
Step 4
Click on the task icon.
From the Edit Task dialog box (displaying mandatory and optional inputs) you can re-select inputs.
Click the Manage Workflow User Inputs button. The Workflow User Inputs dialog box appears.
Step 5
Step 6
Name
Description
Input Label field
The label assigned to the input.
Input Description field
The description of the input.
Optional checkbox
If checked, marks the input as optional at the time of
workflow execution.
Input Type field
The type of input category. During the editing and saving
of a workflow task, the Input Type field is no longer
editable.
Admin Input Value field
The current administrator's list of inputs. The existing list
cannot be changed. However, the order of the new inputs
can be changed (for example, the grid that displays all of
the input fields).
From the Workflow User Inputs dialog box click the (+) Add Workflow User Input icon to add a new input.
Click Submit.
Registering Custom Workflow Inputs
Note
As a prerequisite you should develop the required TaskConfigIf and the AbstractTask components for
your custom workflow.
You can develop your own input types in Cisco UCS Director. However, they must be prefixed with your
module ID. An example is shown below:
public static final String NEXUX_DEVICE_LIST = "foo_nexus_device_l:
@UserInputField(type = ModuleConstants.NEXUS_DEVICE_LIST)
Cisco UCS Director Orchestration Guide, Release 5.3
38
Beta Draft
Creating Workflows
Registering Custom Workflow Inputs
In this example, ModuleContrants.NEXUS_DEVICE_LIST resolves to foo_nexus_device_list.
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Step 8
Step 9
Step 10
Step 11
Step 12
Step 13
Step 14
Step 15
Step 16
Step 17
Step 18
Step 19
In UCS Director, choose Policies > Orchestration, then select Workflows. The Workflows tab displays a table that
lists the available workflows.
Choose Add Workflow to open the Add Workflow dialog box.
From the Workflow Context drop-down list, choose the workflow context. This workflow is used in the selected content.
From the Workflow Context drop-down list, choose the workflow context. This workflow is used in the selected content.
Check the Save as Compound Task checkbox, to use this workflow as a task in another workflow.
Check the Place in New Folder checkbox, to create a new folder for placing this workflow.
From the Select Folder drop-down list, choose a folder under which the workflow needs to be added.
Click Next. The Workflow User Inputs screen appears.
Click the Add icon.
In the Add Entry to window, enter the unique name and description for the workflow user input.
Click Select, to choose a type of input. Based on the selected input type, other fields appear.
Click Submit. The defined input is added to the workflow.
Click Submit. The workflow is created under the selected folder.
In the upper left corner, choose Add User Inputs.
Navigate to the folder where you have created the workflow.
Click the workflow. The Workflow Designer window opens, displaying an Available Tasks list and the Workflow
Design graphical view.
Click on a required task from the Available Tasks list and drag-and-drop the selected task onto the Workflow Designer
window.
Click Next. The User Input Mapping screen appears.
Select attributes that you would like to use values from workflow input field.
• If Map to User Input is checked for the selected task, inputs are prompted during workflow execution. From the
User Input drop-down list, choose the input.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
39
Creating Workflows
Using Script Modules
• If the selected task has no attributes that can be mapped to user input, click Next.
Step 20
Step 21
Step 22
Step 23
Step 24
Step 25
Step 26
Step 27
Step 28
Step 29
Step 30
Step 31
Click Next.
Enter the values for the task inputs that are not mapped to workflow inputs.
Click Submit. The workflow task is saved.
Place your cursor at the lower left corner of the task, an on success task icon appears in green.
Move your cursor over the green area and drag to the next task or Completed (Success) task icon.
Place your cursor at the lower right corner of the task, an on failure task icon appears in red.
Move your cursor over th e red area and drag to the Completed (Failure) task icon. The tasks are linked to form a
complete workflow.
Click Close.
Select the workflow and click Execute Now. The system provides the service requests ID for the submitted workflow.
Choose Organization > Sevice Requests. The Service Requests for all user group appears.
Click the Service Requests tab.
Select the submitted workflow. You can use the service request ID to search for the workflow. The Workflow Status
tab displays the current status of the service request.
Using Script Modules
Script modules provide an interface for you to perform customized actions such as adding library scripts that
can be integrated with custom workflow tasks. You can export or import modules to different appliances, and
the registered scripts in those modules will be available for in the environment.
The following table describes the actions you can perform on script modules:
Task
See
Adding script modules
Adding Script Modules, on page 41
Adding libraries
Adding Libraries, on page 41
Adding jars
Adding Jars, on page 42
Adding Lists of Values
About Lists of Values, on page 43
Adding Context Mappings
About Context Mapping, on page 45
Adding Tabular Reports
About Tabular Reports, on page 48
Exporting script modules
Importing Script Modules, on page 53
Importing script modules
Importing Script Modules, on page 53
Cisco UCS Director Orchestration Guide, Release 5.3
40
Beta Draft
Creating Workflows
Adding Script Modules
Adding Script Modules
Step 1
Step 2
Step 3
Step 4
Step 5
On the menu bar, choose Policies > Orchestration..
Click the Script Modules tab.
Click Add.
In the Modules Information screen, complete the following:
Name
Description
Module Name field
The name for the script module.
Module Description field
The description for the script module.
Click Submit.
Adding Libraries
Before You Begin
Before you can add a library, you must create a script module.
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration..
Click the Script Modules tab.
In the Script Modules pane, double-click the script module to which you want to add the library.
Step 4
Step 5
Click Add.
In the Library Information screen, complete the following:
Step 6
Name
Description
Name field
The name for the script module.
Description field
The description for the script module.
Script text box
Add library scripts in this area.
Click Submit.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
41
Creating Workflows
About Jars
Accessing Libraries
You can access libraries in the followings ways:
Invoke a library from another library
Use the following syntax to invoke a library from another library:loadLibrary("Module Name>/<Library
Name>")
For example:
ImportPackage(java.lang);
function test(){
logger.addInfo("test1");
loadLibrary("Test_Module/testlib1");
}
test1();
Invoke a library from a custom task
When you create a custom workflow task, you can use the same syntax shown above to invoke a library. Refer
to the Managing the Custom Workflow Tasks section in the Cisco UCS Director Custom Workflow
Management guide on how to add the code to invoke a library while creating a custom task.
About Jars
Jars provide an interface to register .jar files with a script module that can be invoked from a library or a
custom task.
Adding Jars
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration..
Click the Script Modules tab.
In the Script Modules pane, double-click the script module to which you want to add the jar files.
Step 4
Step 5
Step 6
Click the Jars tab.
Click Add.
In the Add Jar screen, click Browse and select the jar file to upload from your local folder.
Step 7
Click Submit.
Accessing Jars
Use the following syntax to upload a .jar file:
loadJar("ModuleName>/<JarName>")
Cisco UCS Director Orchestration Guide, Release 5.3
42
Beta Draft
Creating Workflows
About Lists of Values
For example:
importPackage(java.lag);
loadJar("Test_Module/test.jar");
importPackage(com.cisco.test);
function TestLib(){
var test = new Test();
test.setData("Hello");
logger.addInfo("data=" + test.getData());
}
Note
For external packages and classes that may not be in the .java package, you must prefix the package name
with "Packages.XXX".
importPackage(java.lang);
loadJar("Test_Module/testscript.jar
importPackage(Package.com.test);
function TestLib(){
logger.addInfo("Access JarTest");
var test5 = new Packages.com.test.JarTest;
logger.addInfo(test5.testmethod()
}
About Lists of Values
You can create Lists of Values (LOVs) to provide a predefined set of values for input.
Adding a LOV
Before You Begin
Create a Script Module.
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
On the menu bar, choose Policies > Orchestration.
Click the Script Module tab.
In the Script Module pane, double-click the Script Module you want to use.
Click the LOVs tab.
Click Add.
In the LOV Information dialogue box, complete the following:
a) Name field and Description field — Add a name and description for the LOV.
a) Script text box — Contains the template code for the LOV provider registration.
Provide your own implementation by modifying the getDataProvider() method.
Note
Do not edit the createLOV(), registerLOV(), or registerGlobalInputs() methods.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
43
Creating Workflows
About Lists of Values
Step 7
Click Submit.
Using the Registered LOV in a Custom Task
Before You Begin
Identify the Custom Workflow Task you want to use with your registered LOV. You can use an existing
Custom Workflow Task or create a new one.
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration.
Step 4
Step 5
Step 6
Step 7
Step 8
Click Edit.
Click the Next button to move to the Custom Task Inputs dialog box.
Check the box for the Input Field that you want to use.
Click the Edit icon.
In the Edit Inputs Entry dialog box, edit the following options:
Click the Custom Workflow Tasks tab.
From the Task Name column, choose the custom task you want to use.
a) Input Field Type — Choose List of Values (LOV) from the drop-down list.
a) LOV Attributes — In the LOV Provider Name text box, enter the name with which the LOV was registered for
that input.
Step 9
Step 10
Click Submit.
In the Modify Custom Workflow Task wizard, click Next until you reach the Script screen.
Step 11
Step 12
In the Script text box, use this script for the value of the LOV: Var
Click Submit.
lovValue = input.lovInputName.
Editing a LOV
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
On the menu bar, choose Policies > Orchestration.
Click the Script Module tab.
In the Script Module pane, double-click the script module that contains the LOV you want to edit.
Choose the LOVs tab.
Choose the LOV you want to edit.
Click Edit.
Edit the LOV fields that you are allowed to change:
a) Description text box — Edit the description of the LOV.
Cisco UCS Director Orchestration Guide, Release 5.3
44
Beta Draft
Creating Workflows
About Context Mapping
b) Script text box — The Script box contains the template code for the LOV provider registration.
Provide your own implementation by modifying the getDataProvider() method.
Note
Step 8
Do not edit the createLOV(), registerLOV(), or registerGlobalInputs() methods.
Click Submit.
Deleting a LOV
Before You Begin
Remove references to this LOV from any Custom Tasks or Workflows.
Step 1
Step 2
Step 3
Step 4
Step 5
On the menu bar, choose Policies > Orchestration.
Click the Script Module tab.
In the Script Module pane, double-click the script module that contains the LOV you want to delete.
Click the LOVs tab.
Select the LOV you want to delete and click Delete.
A dialog box appears to confirm the deletion.
Click Submit.
Step 6
About Context Mapping
This Context Mapping module allows you to dynamically add a Context Workflow Mapping. The Context
Workflow Mapping creates an action label for a report, and assigns a workflow to that action label.
Adding a Context Mapping
Before You Begin
• Create a Script Module.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
45
Creating Workflows
About Context Mapping
• Identify the report which will use the action label. You will use the name of this report when you create
a Context Mapping.
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
On the menu bar, choose Policies > Orchestration .
Click the Script Module tab.
In the Script Module pane, double-click the script module you want to use.
Click the Context Mapping tab.
Click Add.
In the Add Context Mapper dialog box, complete the following:
a) Name field — Enter a unique name for the context mapping.
The system will create a context workflow mapping that has the same name.
b) Report Name field — Enter the name of the report that will use the action label.
This name should match the reportName field from the Report Metadata of the report.
c) Select Tabular Field drop-down list — Click Select....
A Select dialog box appears. Check the box next to the tabular field you want to use.
d) Description field — The description of the Context Mapping.
e) Script text box — The script that creates the Context Workflow Mapping and associates the Context Workflow
Mapping to the existing report.
Note
The system updates the script with the information you enter for the fields. You do not need to edit the
script.
Step 7
Step 8
Step 9
Click Submit.
The Status column will display Success or Fail.
If the result was Fail, edit the Context Mapping and make sure the correct Report Name and Tabular Field have been
entered, then Submit again.
If the result was Success, on the menu bar choose Policies > Orchestration.
Step 10
Click the Context Workflow Mapping tab.
The Context Mapping you created is listed in the Mapping Name column.
Step 11
Step 12
Step 13
Click on the context workflow mapping you just created.
Click Edit.
In the Edit Workflow Mappings dialog box, click Add Workflow.
The dialog box will add a section named Workflow 1.
Step 14
In the Workflow 1 dialog box, complete the following:
a) Selection Required check box
• If you check this box, the Workflow drop-down list will no longer have any values available. You must execute
the Context Workflow Mapping in the Workflow Designer dialog box for the Workflow to be visible in the
Workflow drop-down list below.
• If you do not check this box, provide information for the remaining fields.
b) Action Label field — Enter the name of the Action Label that will be connected to the workflow. Must be a unique
name.
c) Workflow drop-down list — Select the workflow to be executed when the user clicks on the action label in the report.
Cisco UCS Director Orchestration Guide, Release 5.3
46
Beta Draft
Creating Workflows
About Context Mapping
If you checked the Selection Required check box, you will see the new workflow you just created. If you did not
check the Selection Required check box, choose a workflow listed in this drop-down list.
d) Authorized User Types dialog box — In the Select Items dialog box, click the checkbox for each of the user types
you authorize. Your choices are:
• Service End-User
• Group Admin
• System Admin
• Operator/Other Administrator
e) Click Submit.
To add an additional Workflow step to this Context Workflow Mapping, click the Add Workflow button and complete
the fields.
To delete a Workflow step from this Context Workflow Mapping, click Delete Field below the workflow you want
to delete.
Step 15
If you are satisfied with your Workflow mappings, click Submit.
From the mapped report, you will see the Action Label you defined.
Editing a Context Mapping
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
On the menu bar, choose Policies > Orchestration
Click the Script Module tab.
In the Script Module pane, double-click the script module you want to use.
Select the Context Mapping tab.
Select the name of the Context Mapping you want to edit and click Edit .
In the Edit Context Mapper screen, edit the fields you want to change.
You can not edit the Name field.
You must select a value for the Tabular Fields field, as the previous value does not persist.
Step 7
Click Submit.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
47
Creating Workflows
About Tabular Reports
Deleting a Context Mapping
Before You Begin
Remove references to this Context Mapping from all Workflows and reports.
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
On the menu bar, choose Policies > Orchestration.
Click the Script Module tab.
In the Script Module pane, double-click the Script Module that contains the Context Mapping you want to delete.
Choose the Context Mapping tab.
Choose the name of the Context Mapping you want to delete.
Click Delete.
A popup will appear to confirm the deletion.
Click Submit.
About Tabular Reports
You can create Tabular Reports to provide a predefined set of values for input to custom workflows.
Adding a Tabular Report
Before You Begin
Create a Script Module.
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
On the menu bar, choose Policies > Orchestration.
Click the Script Module tab.
In the Script Module pane, double-click the script module you want to use.
Click the Tabular Reports tab.
Click Add.
In the Tabular Report Information dialog box, complete the following:
Step 7
Tabular Report Name field and Description field — Enter a name and description for the tabular report.
Step 8
Column Entries — Click + (Add) and complete the following fields:
a) Column Name — The name of the column.
b) Column Type drop-down list — The options are:
• Text
• Integer
• Long
Cisco UCS Director Orchestration Guide, Release 5.3
48
Beta Draft
Creating Workflows
About Tabular Reports
• Double
c) Column Type checkbox — Choose a checkbox to add an option to a column. The options are:
• Management column checkbox
You must check Management column for exactly one column entry.
If you check Management column, it can be used for filtering.
• Display column checkbox
You must check Display column for exactly one column entry.
• Hide the Field checkbox
You may check this option for any column entry.
d) Click Submit.
Once a Column Entry has been created, you can not edit the Column Entry to change its Column Type if the
Column Type is Management or Display. To change this, delete the Column Entry and create a new one.
Step 9
Script field — Check the Show Script checkbox to see and edit the Script field.
A Record Entry is one value for each Column Entry. You must edit the Script field in order to create a Record Entry.
Note
Do not edit or delete anything before //START
IMPLEMENTATION.
OF YOUR IMPLEMENTATION
and after //END
OF YOUR
a) Create Record Entries:
Create a value for each Column Entry defined in the Tabular Report. Create these values in the section of the script
between the lines //START OF YOUR IMPLEMENTATION. and //END OF YOUR IMPLEMENTATION.. Use the correct
function depending on the Column Type of the Column Entry, as shown in the following list.
• Text — model.addTextValue("value");
• Integer — model.addNumberValue(42);
• Long — model.addLongNumberValue(1000);
• Double — model.addDoubleValue(8.6);
Separate the Record Entry function calls using model.completedRow();.
Step 10
Click Submit.
Example: Creating Record Entries for your Column Entries
Suppose you created two Column Entries for your Tabular Report, the first one with Column Name Name
and of Column Type Text, and the second one with Column Name Department and of Column Type Long.
Once you have created the Column Entries in your Tabular Report, you will see function calls to create
these Column Entries in the script.
function implementationForTabularReport(report)
{
var model = new TabularReportInternalModel();
model.addTextColumn("Name","Name");
model.addNumberColumn("Department","Department");
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
49
Creating Workflows
About Tabular Reports
model.completedHeader();
//START OF YOUR IMPLEMENTATION.
//END OF YOUR IMPLEMENTATION.
model.updateReport(report);
}
function getSelectionColumnId(){
return "1";
}
function getDisplayColumnId(){
return "0";
}
You will also see a section in the middle of the script that begins with //START OF YOUR IMPLEMENTATION.
and ends with //END OF YOUR IMPLEMENTATION. You can create Record Entries in that section of the script.
Record Entries assign values to the Column Entries. The example below assigns a text value of "Smith"
to the column with Column Name Name and a long number value of 40 to the column with Column Name
Department. The function call model.completedRow(); indicates the end of this Record Entry.
function implementationForTabularReport(report)
{
var model = new TabularReportInternalModel();
model.addTextColumn("Name","Name");
model.addLongNumberColumn("Department","Department");
model.completedHeader();
//START OF YOUR IMPLEMENTATION.
model.addTextValue("Smith");
model.addLongNumberValue(40);
model.completedRow();
//END OF YOUR IMPLEMENTATION.
model.updateReport(report);
}
function getSelectionColumnId(){
return "1";
}
function getDisplayColumnId(){
return "0";
}
Using a Tabular Report in a Custom Workflow Task
Before You Begin
Create a Tabular Report for a Script Module.
Cisco UCS Director Orchestration Guide, Release 5.3
50
Beta Draft
Creating Workflows
About Tabular Reports
Identify the Custom Workflow Task you want to use with your Tabular Report. You can use an existing
Custom Workflow Task or create a new one.
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration.
Click the Custom Workflow Tasks tab.
From the Task Name column, choose the Tabular Report.
Step 4
Step 5
Step 6
Click Edit.
Click the Next button to move to the Custom Task Inputs dialog box.
In the workflows that call the report, check the box for the Input Field that you wish the Tabular Report to supply input
to.
Click the Edit icon.
In the Edit Inputs Entry dialog box, edit the following options:
Step 7
Step 8
• Input Field Type — Choose Table from the drop-down list.
• Map to Input Type — From the Name column, click on the name of your Tabular Report and click Select.
• Table Attributes — Enter the Tabular Report name in the Table Name field.
Step 9
Step 10
Click Submit.
In the Modify Custom Workflow Task wizard, click Next until you reach the Script screen, then click Submit.
You may now use your Tabular Report as input to a custom workflow included in a workflow task.
Editing a Tabular Report
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
On the menu bar, choose Policies > Orchestration.
Click the Script Module tab.
In the Script Module pane, double-click the script module for which you want to edit a Tabular Report.
Step 7
Click Submit.
Choose the Tabular Report tab.
Choose the name of the Tabular Report you want to edit and click Edit .
In the Edit dialog box, edit the fields you want to change.
Note
You can change the Column Type drop-down list values of a Management column or of a Display column. If
you want to deselect the Column Type checkbox for a Management column or for a Display column, you must
delete the existing Column Entry and create a new one.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
51
Creating Workflows
Exporting Script Modules
Deleting a Tabular Report
Before You Begin
Remove references to this Tabular Report from all Custom Workflow Tasks.
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
On the menu bar, choose Policies > Orchestration.
Click the Script Module tab.
In the Script Module pane, double-click the script module that contains the Tabular Report you want to delete.
Choose the Tabular Report tab.
Select the name of the Tabular Report you want to delete.
Click Delete.
A dialog box will appear to confirm the deletion.
Click Submit.
Exporting Script Modules
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration..
Click the Workflows tab.
In the Workflows pane, choose the workflow that you want to export.
Step 4
Step 5
Click Export.
In the Select Workflows screen, select the workflows that you want to export and click Next.
Step 6
In the Select Custom Tasks screen, select the custom tasks that you want to export and click Next.
Step 7
In the Select Script Modules screen, select the script module that you want to export and click Next.
Step 8
In the Select Activities screen, select the activities that you want to export and click Next.
Step 9
In the Confirmation screen, complete the following:
Step 10
Name
Description
Exported By field
The name of the person that exported the script module.
Comments field
Any comments with the export.
Exported File Name field
The name of exported file.
Click Export.
Cisco UCS Director Orchestration Guide, Release 5.3
52
Beta Draft
Creating Workflows
Importing Script Modules
Importing Script Modules
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration..
Click the Workflows tab.
In the Workflows pane, choose the workflow that you want to export.
Step 4
Step 5
Click Import.
In the File Upload/Validation screen, click Browse and upload the file that you want to import.
Step 6
Click Upload.
A success message is displayed if the uploaded file is valid for import.
Click Next.
In the Import Policies screen, complete the following:
Step 7
Step 8
Name
Description
Workflows drop-down list
If the file you imported already exists, choose from the
following options:
• Replace-- Choose this option if you want to replace
the workflows in the existing file with the one you
uploaded.
• Keep both-- Choose this option if you want to keep
the workflows in both the uploaded and existing files.
• Skip-- Chose this option if you want to skip using
this policy.
Custom Tasks drop-down list
If the file you imported already exists, choose from the
following options:
• Replace-- Choose this option if you want to replace
the custom tasks in the existing file with the one you
uploaded.
• Keep both-- Choose this option if you want to keep
the custom tasks in both the uploaded and existing
files.
• Skip-- Chose this option if you want to skip using
this policy.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
53
Creating Workflows
Importing Script Modules
Name
Description
Script Modules drop-down list
If the file you imported already exists, choose from the
following options:
• Replace-- Choose this option if you want to replace
the script modules in the existing file with the one
you uploaded.
• Keep both-- Choose this option if you want to keep
the script modules in both the uploaded and existing
files.
• Skip-- Chose this option if you want to skip using
this policy.
Activities drop-down list
If the file you imported already exists, choose from the
following options:
• Replace-- Choose this option if you want to replace
the activities in the existing file with the one you
uploaded.
• Keep both-- Choose this option if you want to keep
the activities in both the uploaded and existing files.
• Skip-- Chose this option if you want to skip using
this policy.
Step 9
Click Import.
Cisco UCS Director Orchestration Guide, Release 5.3
54
Beta Draft
Creating Workflows
Importing a Workflow
Importing a Workflow
This task is used to import a workflow that you previously downloaded.
Step 1
Step 2
On the menu bar, choose Policies > Orchestration.
In the Orchestration pane, click the Workflows tab.
Step 3
Step 4
On the Workflows tab, click Import.
In the Import dialog box, click Browse to go to the directory on which the workflow was downloaded.
Step 5
Step 6
Step 7
Click on the workflow and click Open.
Click Upload.
Once the zipped file has uploaded successfully, click Next.
(Optional) In the Import dialog box, complete the following fields to specify how assets of the zipped file are handled
if these assets already exist in the workflow folder:
Step 8
Name
Description
Workflows drop-down list
Choose from the following options to specify how this asset is handled:
• Replace
• Keep Both
• Skip
Custom Tasks drop-down list
Choose from the following options to specify how this asset is handled:
• Replace
• Keep Both
• Skip
Script Modules drop-down list
Choose from the following options to specify how this asset is handled:
• Replace
• Keep Both
• Skip
Activities drop-down list
Choose from the following options to specify how this asset is handled:
• Replace
• Keep Both
• Skip
Import Workflows to Folder
checkbox
Check the checkbox to import the workflow to a folder of your choice.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
55
Creating Workflows
Exporting a Workflow as an Image
Step 9
Name
Description
Select Folder drop-down list
Choose a folder to import the workflow. If you chose [New Folder..] in the
drop-down list, complete the New Folder field.
New Folder field
Enter the name for the new folder that you want to create as your import folder.
Click Import.
Exporting a Workflow as an Image
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
On the menu bar, choose Policies > Organization.
Choose the Workflows tab.
Choose a workflow from the left-hand column.
From within the Workflow Designer window click the Full View icon.
Click Save.
Choose a directory to save the image file (workflow_*.png).
Click Save.
Renaming Workflows
In order to rename a workflow, you can clone the workflow and delete the original workflow.
Step 1
Step 2
On the menu bar, choose Policies > Orchestration.
Click the Workflows tab.
Step 3
In the Workflows pane, choose the workflow that you want to rename.
Step 4
Step 5
Step 6
Step 7
Click Clone Workflow.
In theClone Worklow screen, enter the new name for the workflow in the Workflow Name field.
Click Next.
In the Add User Inputs screen, click Next.
Step 8
In the Add User Outputs screen, click Submit.
Cisco UCS Director Orchestration Guide, Release 5.3
56
Beta Draft
CHAPTER
5
Executing Workflows
This chapter contains the following sections:
• Executing Workflows, page 57
• Adding Conditional Processing to Workflows, page 61
• Context Workflow Mapping, page 67
• Scheduling Workflows, page 69
• Rolling Back Workflows, page 70
• Validating Workflows, page 71
• Workflow Versioning, page 72
Executing Workflows
You can choose several different ways to execute a workflow in Orchestrator.
• Creating a service request
• Using the Execute Now action
• Using a VM Action policy
• Using a trigger
Accessing Service Requests
You can view and generate workflow executions using service requests.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
57
Executing Workflows
Using the Execute Now Action
Note
Step 1
Step 2
Step 3
Step 4
Step 5
An archive option is also available for each service request.
On the menu bar, choose Organization > Service Requests.
Choose the Service Requests tab.
Choose a service request.
Click View Details. The Service Request Status pane appears.
Click Close.
Resubmitting a Failed Service Request
You can resubmit all or part of a failed service request.
Note
Step 1
Step 2
Step 3
Step 4
An administrator can change input values by opening the service request, selecting the Input/Output tab,
and entering new values into a form before resubmitting.
On the menu bar, choose Organizations > Service Requests.
Click on a failed service request.
Click on Resubmit Request. The Resubmit Service Request dialog appears.
Select a subtask from the Resubmit Step drop-down menu. The workflow will be resubmitted beginning with this task.
You can select any task up to and including the subtask that caused the workflow to fail.
You can select nested compound tasks at any depth for the resubmitted
task.
(Optional) If all approvals succeeded before the workflow failed, bypass the approval tasks by selecting the Skip approvals
if already approved checkbox.
Click Submit.
Note
Step 5
Step 6
Using the Execute Now Action
You can execute a workflow using the Execute Now action. The drop-down list is accessible on the right of
the interface. If you choose to provide any input(s) during the execution stage, you must add those input(s)
at execution. However, if those inputs are provided when you add tasks to the workflow, then those inputs
are also accepted.
Cisco UCS Director Orchestration Guide, Release 5.3
58
Beta Draft
Executing Workflows
Using a VM Action Policy
Using a VM Action Policy
You can create custom actions by using a User VM Action policy. Custom action policies can contain one or
more actions. You can also create an action label and associate a workflow to it. You can select a User Action
policy when you create a virtual data center (vDC). The virtual machines (VMs) created under this policy still
have all of the custom actions enabled that are included in the original User Action policy.
Note
End user VM Action policies can be used in a VM context.
The following procedure describes how to create a workflow that consists of a VM snapshot and a VM resize
task. This workflow can be used as a custom action in the VMs context.
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
On the menu bar, choose Policies > Orchestration.
Choose User VM Action Policy tab.
Click Add.
In the Add Policy screen, complete the following fields:
Name
Description
Policy Name field
The policy name.
Policy Description field
The description of the policy.
Select No of Actions drop-down list
Choose the number of actions associated with the policy.
Click Next.
In the Add Policy screen, complete the following fields:
Name
Description
Action Label field
The label for the VM action.
Workflow drop-down list
Choose the workflow associated with this action.
Authorized User Types drop-down list
Choose the user type authorized to perform this action.
Click Submit.
After you create a User VM Action policy, as an administrator, you can choose this policy while creating a vDC. All
VMs that belong to this vDC have the ability to use these custom actions.
Note
Only one User VM Action policy can be associated with a
vDC.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
59
Executing Workflows
Using a Trigger
Using a Trigger
Triggers are used to execute workflows based on specified conditions that must be met. Once those conditions
are met, a workflow is (automatically) executed. This procedure describes how to trigger a resize if the VM
memory limit is reached.
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Orchestration.
Choose the Triggers tab.
Click Add.
In the Add Trigger: Trigger Information screen, complete the following fields:
Name
Description
Trigger Name field
The name of trigger.
Is Enabled check box
Enables the trigger.
Description field
The description of trigger.
Frequency drop-down list
Choose the frequency at which the trigger rule is to be
verified.
Trigger Type drop-down list
Choose the trigger type:
• Stateful-This type's current state is recorded and
actions are executed only when there is a change in
a trigger state.
• Stateless- This type's trigger condition is verified at
a frequency provided in the frequency field. For
example, if a VM power status is monitored, a trigger
would be executed when a change in the power status
occurs.
Step 5
Step 6
Click Next.
In the Add Trigger: Specify Conditions screen, complete the following fields:
Name
Description
Number of Conditions field
The number of conditions to check.
What to Monitor drop-down list
Choose the component that is to be monitored.
VM drop-down list
Choose the component entry to monitor. If a VM is being
monitored, choose VM to monitor.
Parameter drop-down list
Choose the parameter of the component to monitor.
Cisco UCS Director Orchestration Guide, Release 5.3
60
Beta Draft
Executing Workflows
Adding Conditional Processing to Workflows
Name
Description
Trigger Type drop-down list
Choose trigger type:
• Stateful-This type's current state is recorded and
actions are executed only when there is a change in
a trigger state.
• Stateless-This type's trigger condition is verified at
a frequency provided in the frequency field. For
example, if a VM power status is monitored, a trigger
would be executed when a change in the power status
occurs.
Step 7
Step 8
Click Next.
In the Add Trigger: Specify Workflow screen, complete the following fields:
Name
Description
Maximum Invocations field
The number of times that the trigger is invoked.
(When Trigger State Becomes Active) Select Workflow Choose the workflow to be executed when the trigger is
drop-down list
activated.
(When Trigger State Become Clear) Select Workflow
drop-down list
Step 9
Choose the workflow to be executed when the trigger is
cleared.
Click Submit.
Adding Conditional Processing to Workflows
Orchestrator's task library includes a set of predefined tasks that you can add to a workflow for conditional
processing. You can specify conditions for the predefined tasks that are forks in the workflow. The outcome
of evaluating the condition determines which branch the workflow takes. For example, a workflow condition
might be to check the power status of a VM. If the VM status is powered on, the workflow takes a certain
path, and if the VM is powered off, it takes a different path.
The following predefined tasks are accessible in Workflow Designer for conditional processing:
• Start Loop --- This task can be used to begin a loop in the workflow based on the input condition.
• End Loop --- This task can be used to mark the end of the loop in the workflow.
• If Else --- This task evaluates the input condition provided. A task or set of tasks are executed if the
input condition is true. If the input condition is false, another task or set of tasks are executed.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
61
Executing Workflows
Adding an If-Else Logical Branch
• Conditional Task --- This task can be used to create multiple execution paths in the workflow based
on the condition you specify for each task in the workflow.
You can use the predefined tasks to create conditional processing constructs such as If, If-Else, nested If,
Loop and Switch in your workflows.
Adding an If-Else Logical Branch
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
On the menu bar, choose Policies > Orchestration.
Click the Workflows tab.
Choose the workflow that you want add the If-Else logical branch.
Double-click the workflow to open it in Workflow Designer.
In the Available Tasks pane, click the Procedural Tasks folder.
Click the If Else task and drag and drop it into Workflow Designer.
In the Add Task (If Else) screen, complete the following fields:
Name
Description
Task Name field
The name of the task.
Comment field
Comments for the task.
Retry Execution checkbox
Check the checkbox to retry ( at a later time), if the task
fails.
Retry count drop-down list
Choose the number of attempts to perform a retry.
Retry Frequency drop-down list
Choose the duration between the attempts at a retry. The
workflow pauses until the task is retried n times until it
succeeds before it can continue with the next task or
completion of the workflow.
Step 8
Step 9
Click Next.
In the User Input Mapping screen, click Next.
Step 10
In the Task Inputs screen, complete the following fields:
Cisco UCS Director Orchestration Guide, Release 5.3
62
Beta Draft
Executing Workflows
Adding an If-Else Logical Branch
Name
Description
Specify the condition field
Enter the condition that will be evaluated to determine the
course of the workflow. As a result of evaluating the
condition the following can result:
• If the condition evaluates to true, the course for the
workflow towards successful completion is executed.
• If the condition evaluates to false, the workflow will
not be executed successfully.
The conditions that you define must only contain the
following operators:
==, !=, <, <=, >, >=, ||, &&, contains, startsWith,
endsWith
Below are some examples that you can use while specifying
conditions:
• TaskName.OUTPUT ATTRIBUTE NAME=="2"
• WORKFLOW USERINPUT LABEL NAME
contains "xyz"
• TaskName.OUTPUT ATTRIBUTE NAME ==
WORKFLOW USERINPUT LABEL NAME ||
WORKFLOW USERINPUT LABEL NAME !=
"123"
Step 11
In the User Output Mapping screen, click Submit.
Step 12
Step 13
In the If-Else task icon that you created, click and drag the True connector and the False connector to more task icons.
In the If-Else task icon that you created, click and drag the On Failure connector to the Completed (Failed) task icon.
This link defines the logical branch of the workflow for failure. If required, you can add more task icons to this branch
in the workflow.
What to Do Next
After you create your If-Else logical branch, you can execute the workflow. You can view and generate the
workflow executions using service requests.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
63
Executing Workflows
Adding Loops
Adding Loops
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
On the menu bar, choose Policies > Orchestration.
Choose the Workflows tab.
Choose the workflow that you want to add a loop.
Double-click the workflow to open it in Workflow Designer.
In the Available Tasks pane, click the Procedural Tasks folder.
Click the Start Loop task and drag and drop it intoWorkflow Designer.
In the Add Task (Start Loop), complete the following fields:
Name
Description
Task Name field
The name of the task.
Comment field
Comments for the task.
Retry Execution checkbox
Check the checkbox to retry ( at a later time), if the task
fails.
Retry count drop-down list
Choose the number of attempts to perform a retry.
Retry Frequency drop-down list
Choose the duration between the attempts at a retry. The
workflow pauses until the task is retried n times until it
succeeds before it can continue with the next task or
completion of the workflow.
Step 8
Step 9
Click Next.
In the User Input Mapping screen, click Next.
Step 10
In the Task Inputs screen, complete the following fields:
Name
Description
List based iteration checkbox
Check the checkbox for list based iteration.
Input for list based iteration
The input values for list based iteration.
Cisco UCS Director Orchestration Guide, Release 5.3
64
Beta Draft
Executing Workflows
Adding Loops
Name
Description
User Input to assign iterated values drop-down list
The user input for the list based iteration.
Note
Cisco UCS Director contains a task output variable
called START_LOOP_OUTPUT of generic text
type which holds the value for each loop iteration.
You cannot map this output to the next task input
whose type is not generic text. Hence, you must
create workflow inputs of the type you need(such
as email address) and map it to the Start Loop task
input that you added using the User Input to
assign iterated values drop-down list.
Count based iteration checkbox
Check the checkbox for loop counter based iteration.
Number of times to loop field
The loop counter that controls the iterations of the loop.
Step 11
In the User Output Mapping screen, select the attributes you want to use as values from the workflow outputs.
Step 12
Step 13
Click Submit.
In the Available Tasks pane, click and drag the tasks that you want as part of the loop.
Step 14
Step 15
Step 16
Create links between the task icons in the loop using the On Success connector.
Create a link between the Start task icon and the Start Loop task icon
In the Available Tasks pane, click the Procedural Tasks folder.
Step 17
Step 18
Click the End Loop task and drag and drop it intoWorkflow Designer.
Complete the remaining screens in the Add Task (End Loop) wizard, and click Submit.
Step 19
Connect the End Loop task icon to the Completed (Success) and Completed (Failed) task icons.
What to Do Next
After you add loops, you can execute the workflow. You can view and generate the workflow executions
using service requests.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
65
Executing Workflows
Adding Switch Operations
Adding Switch Operations
Note
The switch construct you create can contain several execution paths for the workflow, based on the
condition you specify for each task in the workflow.
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Orchestration.
Choose the Workflows tab.
Choose the workflow that you want to add a loop.
Double-click the workflow to open it in Workflow Designer.
Step 5
Step 6
Step 7
In the Available Tasks pane, click the Procedural Tasks folder.
Click the Conditional task and drag and drop it intoWorkflow Designer.
In the Add Task (Conditional task) screen, complete the following fields:
Name
Description
Task Name field
The name of the task.
Comment field
Comments for the task.
Retry Execution checkbox
Check the checkbox to retry ( at a later time), if the task
fails.
Retry count drop-down list
Choose the number of attempts to perform a retry.
Retry Frequency drop-down list
Choose the duration between the attempts at a retry. The
workflow pauses until the task is retried n times until it
succeeds before it can continue with the next task or
completion of the workflow.
Step 8
Step 9
Click Next.
In the User Input Mapping screen, click Next.
Step 10
In the Task Inputs screen, click the + icon to add a condition for each execution path of the workflow. For example, if
your workflow had n possible execution paths, you would add n entries into the conditions table, one entry for each
condition. You can click on the default entry in the table to specify the condition when the workflow takes the default
execution path.
In the Add Entry to screen, complete the following fields:
Step 11
Name
Description
Label field
The label for the condition
Cisco UCS Director Orchestration Guide, Release 5.3
66
Beta Draft
Executing Workflows
Context Workflow Mapping
Name
Description
Condition field
Enter the condition that will be evaluated to determine the
course of the workflow. The conditions that you define
must contain the following operators:
==, !=, <, <=, >, >=, ||, &&, contains, startsWith,
endsWith
Below are some examples that you can use while specifying
conditions:
• TaskName.OUTPUT ATTRIBUTE NAME=="2"
• WORKFLOW USERINPUT LABEL NAME
contains "xyz"
• TaskName.OUTPUT ATTRIBUTE NAME ==
WORKFLOW USERINPUT LABEL NAME ||
WORKFLOW USERINPUT LABEL NAME !=
"123"
Click Submit.
Step 12
In the User Output Mapping screen, select the attributes you want to use as values from the workflow outputs.
Step 13
Step 14
Click Submit.
In the Available Tasks pane, click and drag the tasks that you want to add to the various execution paths of the workflow.
Step 15
Use the connectors in the Conditional task icon to link with the tasks in the execution paths. For example, use the
default connector in the Conditional task icon to create links to the tasks in the default execution path.
Create a links between the Start task icon and the Conditional task icon.
Create links between the various execution paths in the workflow and the Completed (Success) and Completed (Failed)
task icons.
Step 16
Step 17
What to Do Next
After you add the switch construct, you can execute the workflow. You can view and generate the workflow
executions using service requests.
using service requests.
Context Workflow Mapping
You can map a workflow in the form of an action and execute it in the component's context. You can execute
a workflow that contains a set of tasks from within a context of a component. You do not have to browse for
a required workflow in the workflow list in order to execute it. However, you can execute the workflow at
the component level. For example, when you execute a workflow, that you created for a server, you can map
the workflow as an action (for the server) and execute it at the server level instead of browsing for the workflow
in the workflow list.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
67
Executing Workflows
Stage 1: Create a Context Mapper Task
Context workflow mapping consists of these two stages:
• Stage 1- Create a context mapper task and adds it to the workflow that needs to be mapped as an action.
• Stage 2- Adds the workflow to the content mapper list by giving it an action label.
Stage 1: Create a Context Mapper Task
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Orchestration.
Choose the Workflow tab.
Open a workflow in Workflow Designer.
Choose a Context Mapper task and drag it onto the Workflow Designer pane.
Stage 2: Adding to the Workflow to the Content Mapper
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
On the menu bar, choose Policies > Orchestration.
Choose Context Workflow Mapping.
Choose a component to add to your workflow.
Click Edit.
In the Edit Workflow Mappings dialog box, complete the following fields:
Name
Description
Add Workflow icon
Add additional workflows.
Selection Required check box
Check the check so that an end user can select an entry of
the component for the action label to show. Also, the
workflows are filtered based on the component if it is
checked. For example, for LUN Context workflow
mapping, only the workflows which contain the LUN
context mapper task is displayed.
Action Label field
The name of the action label.
Workflow drop-down list
Choose a workflow to execute.
Authorized User Types drop-down list
Choose an authorized user type.
Click Submit. The workflow is added as an action to the component.
Cisco UCS Director Orchestration Guide, Release 5.3
68
Beta Draft
Executing Workflows
Scheduling Workflows
Note
When you browse through the logical unit number (LUN) components and choosing an entry under LUNs, the
action becomes visible (Associate LUN to Datastore). Clicking on this action executes the workflow that you
had previously mapped to this component.
Scheduling Workflows
You can schedule workflows for execution at a specific time. You can also modify several schedule parameters
when a workflow is scheduled.
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration.
Click the Workflows tab.
In the Workflows pane, choose the workflow that you want to schedule.
Step 4
Step 5
Click Schedule.
In the Schedule Workflow screen, complete the following fields:
Name
Description
Recurrence Type drop-down list
The type of reexecution of the workflow. There are several
types:
• No End -The workflow is executed continuously
from the start time based on frequency type and
frequency interval, without any end time.
• Only once-The workflow is executed only once at
the start time.
• Fixed Number of Times-The workflow is executed
n number of times as provided in the Repeat Count
field continuously from the start time based on
frequency type and frequency interval.
• End by Date-The workflow is executed continuously
from the start time based on the frequency type and
frequency interval until the provided end time.
Start Time field
The time of the scheduled workflow execution.
Frequency Type drop-down list
The frequency of the workflow executions. The workflow
can be executed hourly, daily, weekly or monthly.
Frequency Interval drop-down list
Choose the interval at which the workflow needs to be
executed for the frequency that you chose. If the frequency
interval is four and the frequency type is daily, the
workflow is executed every four days.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
69
Executing Workflows
Rolling Back Workflows
Name
Description
User ID field
The user associated to the workflow. This is not a
mandatory field.
If you defined inputs while you created the workflow, you must provide those inputs need to be provided under
the Workflow Inputs.
Click Edit to edit another schedule.
Note
The Modify Workflow Schedule screen is identical to the Schedule Workflow dialog
box.
Note
Step 6
Rolling Back Workflows
You can undo executed workflows by using the Workflow Rollback feature. All tasks that are part of the
workflow are undone when the workflow is rolled back.
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
On the menu bar, choose Organizations > Service Requests.
Choose the Service Requests tab.
Choose the service request to be rolled back.
Click the Rollback Request action.
Check the check box(es) next to the task(s) that you want to roll back.
Note
You can roll back subtasks at any level in the workflow's hierarchy of compound tasks. The Task Name column
in the Rollback Service Request dialog displays the ancestry of each listed task.
Click Submit.
What to Do Next
Right-click the rollback service request and choose View Details to examine its status.
Cisco UCS Director Orchestration Guide, Release 5.3
70
Beta Draft
Executing Workflows
Viewing Workflow Assets (Created or Modified)
Viewing Workflow Assets (Created or Modified)
Before you roll back your workflow you can view the details of all of the assets and resources that were used
during the execution of the workflow. The assets are tracked and available through the service request's View
Details option.
Step 1
Step 2
Step 3
Step 4
Step 5
On the menu bar, choose Organizations > Service Requests.
Choose the Service Requests tab.
Choose a service request to examine.
Choose the View Details option.
Choose the Objects Created and Modified tab.
The Objects Created and Modified tab displays all of the resources that were created or modified as part of the
construction of the workflow. All resources that pertaining to all of the tasks of the workflow are tracked. When you roll
back a workflow, all associated resources are deleted and previously modified resource changes are undone.
Step 6
Click Close.
Validating Workflows
Orchestrator provides a mechanism for validating workflows. Validating a workflow helps identify issues
with the workflow caused by incorrect flow of data from one element to the next. Workflow validation checks
the data bindings and connections between elements. Common issues detected during validation are mapping
mismatch, missing mandatory values for tasks, Task Handler not found and missing admin/task inputs after
import or upgrade.
Orchestrator enables issue detection and resolution by using a wizard-based issue resolver. When you validate
a workflow, a list of issues is created along with suggestions for fixing those issues. Clicking an issue in the
list prompts the user to run the issue wizard resolver. Some issues might require additional information or
input from you. Other issues might be quick fixes that are resolved for you.
Resolving Workflow Validation Issues
Step 1
On the menu bar, choose Policies > Orchestration.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
71
Executing Workflows
Workflow Versioning
Step 2
Step 3
Step 4
Step 5
Step 6
Click the Workflows tab.
Choose the workflow that failed validation.
Click Validate Workflow.
In the Workflow Validation dialog box, double click the description under Resolution.
In the Validation Errors dialog box, view the summary for the issue detected. You can complete the remaining prompts
in the wizard to resolve the validation error.
Workflow Versioning
All Orchestrator workflows have an associated version history. You can use version history to either revert
a workflow state to an earlier one or increment the version. In some scenarios you might use versioning for
comparing the differences between the current state of a workflow with an earlier saved version. Versioning
can be particularly useful when you need to know if a workflow is ready for production, deployment, or for
any other operation.
A new version item is created when a workflow version is incremented and saved. Consequent changes to
the workflow do not change the current version. For example, if you create and save a workflow version X.0.0,
the state of the version is saved in the Cisco UCS Director database. If any changes are made to the workflow,
the changes cannot be applied to workflow version X.0.0. To save the changes, a subsequent workflow version
needs to be created. The version history along with the workflow is saved in the database.
Workflows can be deleted without losing their version history.
Creating Workflow Versions
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
On the menu bar, choose Policies > Orchestration.
Choose the Workflows tab.
Right click the workflow and choose Create New Version.
In the Create New Version screen, complete the following fields:
Name
Description
Version Label field
The label for the version.
Description field
The description for the version.
Click Submit.
In Workflow Designer, complete your changes for the workflow.
Click Close.
The workflows report displays the incremented version of the workflow under the Version column.
Cisco UCS Director Orchestration Guide, Release 5.3
72
Beta Draft
Executing Workflows
Managing Workflow Versions
Managing Workflow Versions
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Orchestration.
Choose the Workflows tab.
Right click the workflow and choose Manage Versions.
In the Manage Versions screen, complete the following fields:
Name
Description
Show latest version checkbox
Check the checkbox to display the latest version of the
workflow in the workflows report .
For example, if the latest workflow version is X.0, it is
displayed as Version X (latest) in the Versioncolumn, in
the workflows report.
Set default version checkbox
Check the checkbox to display the chosen workflow version
as the default version in the workflow report. Choose the
workflow version from the workflows table below.
For example, if you chose the workflow version as X.0 to
be set as the default version for display, it is displayed as
Version X.0 (user selected) in the Versioncolumn, in the
workflows report.
Step 5
Click Submit.
Managing Versions of a Compound Task
Before You Begin
1 Create a compound task called CT. Note that in the Workflow tab, the Version Label for CT is shown as
0. We will refer to this version of CT as CTv0.
2 Include the compound task in a workflow called WF.
3 Validate the workflow WF. Validation should pass.
Step 1
Save CTv0 as a normal (non-compound-task) workflow.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
73
Executing Workflows
Managing Versions of a Compound Task
a)
b)
c)
d)
e)
Go to Policies > Orchestration > Workflow
Choose the compound task workflow CTv0.
Click Edit Workflow.
Uncheck the Save as Compound Task checkbox.
Click through to the Edit User Outputs page and click Submit.
Step 2
In the Workflow Designer, validate WF.
a) Choose the Workflows tab.
b) Choose the workflow WF.
c) Click Workflow Designer.
d) In the Workflow Designer page, click Validate Workflow.
Validation fails with the message The task "Compound add user" does not exist anymore.
Step 3
Create a new version of CT (CTv1).
a)
b)
c)
d)
Choose the Workflows tab.
Choose the workflow CTv0.
Click Create New Version.
In the Create New Version dialog, enter the required fields:
• Version Label - Something recognizable, for example v1.
• Description - Any description.
e)
f)
g)
h)
i)
Click Submit.
When the Workflow Designer comes up, click Close.
Click Edit.
Verify that for CTv1, Save as Compound Taskcheckbox is unchecked.
Close the Edit Workflow page.
Step 4
Validate WF again, as in Step 2.
Validation fails with the message The task "Compound add user" does not exist anymore.
Step 5
Make CTv1 a compound task.
a) Choose the Workflows tab.
b) Choose the workflow CT.
c) Click Edit Workflow.
d) Check the Save as Compound Task checkbox.
e) Click through to the Edit User Outputs page and click Submit.
Step 6
Validate WF again.
Validation is successful.
Step 7
Change the default version of CT back to CTv0.
a) Choose the Workflows tab.
b) Choose the workflow CT.
c) Click Manage Versions.
d) In the Manage Versions dialog, uncheck Set Latest Version as Default.
e) Check Set Selected Version as Default.
f) In the table, check CTv0.
g) Click Submit.
Cisco UCS Director Orchestration Guide, Release 5.3
74
Beta Draft
Executing Workflows
Managing Versions of a Compound Task
Note that in the Workflows tab Version Label is now 0, indicating that CTv0 is the default version of CT.
Step 8
Validate WF again.
Validation is successful. Note that WF is using CTv1 as the compound task, even though CTv0 is the default. Be aware
that this can cause confusion if you have more than one version of a workflow that is used as a compound task.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
75
Executing Workflows
Managing Versions of a Compound Task
Cisco UCS Director Orchestration Guide, Release 5.3
76
Beta Draft
CHAPTER
6
Managing Activities
This chapter contains the following sections:
• Using Activities, page 77
• Adding an Activity, page 78
• Associating an Activity with a Workflow, page 79
• Adding an Activity to a Workflow, page 80
• Exporting an Activity, page 82
• Importing an Activity, page 82
• Deleting an Activity, page 83
• Example: Onboarding Tenants using an Activity, page 83
Using Activities
Activities provide a layer of abstraction to workflow input properties. The abstraction helps you to efficiently
execute any administration scenario (such as tenant onboarding or application deployment) by separating the
specification of a workflow from its actual implementation. Using activities, you can do the following:
• An activity can be used to define the input properties for a workflow, and can be associated with one or
more workflows. Depending upon the activity's context matching condition, the associated workflow is
triggered.
• If associated with a workflow, an activity can be used as a workflow task. Thus, a compound workflow
seems simple and can be used in different use case scenarios.
• An activity can be either triggered programmatically or the by providing inputs dynamically. If triggered
programmatically, a workflow is essentially decoupled from the static infrastructure binding.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
77
Managing Activities
Adding an Activity
Adding an Activity
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
On the menu bar, choose Policies > Orchestration.
Click the Activites tab.
Click Add.
In the Add Activity dialog box, complete the following fields:
Name
Description
Name field
The activity name.
Label field
The label for the activity.
Description field
The description of the activity.
Click Next.
In the Add User Inputs screen, click the + icon to add workflow input properties.
a) In the Add Entry to Input Fields dialog box, complete the following fields:
Name
Description
Input Name field
The name for the activity workflow input.
Input Label field
The label for the activity workflow input.
Optional check box
Check the check box to set the input as optional during
workflow execution.
Input Type field
Click Select. In the Select dialog box, choose the input
type.
b) Click Submit.
Step 7
Step 8
Click Next.
In the Add User Outputs screen, click the + icon to add workflow output properties.
a) In the Add Entry to Output Fields dialog box, complete the following fields:
Name
Description
Output Name field
The name for the activity workflow output.
Output Label field
The label for the activity workflow output.
Output Type field
Click Select. In the Select dialog box, choose the output
type.
Cisco UCS Director Orchestration Guide, Release 5.3
78
Beta Draft
Managing Activities
Associating an Activity with a Workflow
b) Click Submit.
Step 9
Click Submit.
Associating an Activity with a Workflow
You can associate an activity with one or more workflows so as to run the activity as part of the workflow.
The associated activity is displayed as a custom workflow task in the System Activity Tasks folder of the
Workflow Designer.
Before You Begin
You must create an activity that needs to be associated with a workflow. For more information about how to
create an activity, see Adding an Activity, on page 78.
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Orchestration.
Click the Workflows tab.
Click Add Workflow.
In the Add Workflow dialog box, complete the following fields:
Name
Description
Workflow Name field
The workflow name.
Note
Workflow names cannot contain the following
characters: \, ", %, &, ', *, +, ,, ., /, :, ;, <, =, >,
?, ^, |.
Description field
The description of the workflow.
Workflow Context drop-down list
Choose the context in which the workflow can be used.
Orchestrator supports the following options:
• Any—Enables you to use the workflow in any
context.
• Selected VM—Enables you to use the execute the
workflow only when you choose a VM.
Save as Compound Task check box
Check the check box to define the workflow as a compound
task.
Place in New Folder check box
Check the check box to assign the workflow to a new
folder. You can specify the new folder name in the Folder
Name field that appears when you check the check box.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
79
Managing Activities
Adding an Activity to a Workflow
Name
Description
Select Folder drop-down list
Choose the proper folder in to which you want to place the
workflow.
Notify status of execution to initiating user check box
Check the check box to notify the user through email of
the execution status of the workflow. If checked, enter the
additional email addresses in the Additional User(s) to
send Email Notification field. The execution status for
the workflow can be one of the following:
• Completed status
• Failed execution status
• Cancelled execution status
Step 5
Step 6
Click Next.
In the Add User Inputs screen, check the Associate to Activity check box.
Step 7
From the Activity drop-down list, choose an activity.
The user input table is updated based on the selected activity.
Click Next.
In the Add User Outputs screen, the user outputs are displayed based on the selected activity.
Step 8
Step 9
Click Submit.
A basic workflow is created and is available in the Workflows tab.
Adding an Activity to a Workflow
The activity that is associated with one or more workflows is displayed as a custom workflow task in the
System Activity Tasks folder of the Workflow Designer. You can drag-and-drop the selected activity onto
the Workflow Designer window to add an activity to a workflow. You can define the condition for controlling
execution of workflows associated with an activity in the Context Input table of the workflow.
Before You Begin
You must associate an activity with a workflow so that the activity is displayed as a custom workflow task
in the System Activity Tasks folder of the Workflow Designer. For more information about how to associate
an activity with a workflow, see Adding an Activity, on page 78.
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration.
Click the Workflows tab.
Double-clicking the workflow to which you want to add the activity.
Cisco UCS Director Orchestration Guide, Release 5.3
80
Beta Draft
Managing Activities
Adding an Activity to a Workflow
The Workflow Designer dialog box appears.
Step 4
Step 5
Choose the activity from the System Activity Tasks folder.
Drag-and-drop the selected activity onto the Workflow Designer window.
The Add Task dialog box appears.
Step 6
In the Task Information screen, complete the following fields:
Name
Description
Task Name field
The name of the task.
Task Category field
The name of the category task (preselected information).
Task Type field
The name of the type of task (preselected information).
Comments field
The area to enter additional task information.
Retry Execution check box
Check the check box to retry a task (at a later time) if the
task fails. This feature is useful when the state of a resource
is not available and a retrial of the task depends on the state.
Retry Count drop-down list
Choose the number of attempts to perform a retry.
Retry Frequency drop-down list
Choose the duration between the attempts at a retry. The
workflow pauses until the task is retried n times on failure
or until it succeeds before it can continue with the next task
or completion of the workflow.
Step 7
Click Next.
The User Input Mapping screen displays the inputs that are defined for the activity.
Step 8
Step 9
Check the Map to User Input check box to use the corresponding input in the workflow.
In the Context Input table, click the + icon to add a contextual input:
a) In the Add Entry to Input Fields dialog box, complete the following fields:
Name
Description
User Inputs drop-down list
Choose an input to which you to apply the condition.
Minimum Condition drop-down list
Choose the condition that you want to apply to the input.
Value field
The value set for the condition.
Associated Workflow drop-down list
Choose a workflow that needs to executed when the input
satisfies the selected condition.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
81
Managing Activities
Exporting an Activity
b) Click Next.
Step 10
Step 11
Click Revalidate to revalidate the current values.
Click Next.
The User Output Mapping screen displays the outputs that are defined for the activity.
Step 12
Step 13
Check the Map to User Output check box to use the corresponding output in the workflow.
Click Submit.
Exporting an Activity
You can export an activity that is associated with a workflow to your local system to update or make any
changes to the activity. Then, you can import the updated activity to Cisco UCS Director.
Before You Begin
Associate the activity with a workflow so that the activity is displayed as a custom task.
Step 1
Step 2
Step 3
On the menu bar, choose Policies > Orchestration.
Click the Workflows tab.
Click Export.
The Export dialog box appears.
Step 4
Step 5
Step 6
Step 7
Step 8
Step 9
Step 10
Step 11
Step 12
In the Select Workflows screen, choose the workflow that is associated with the activity.
Click Next.
In the Select Custom Tasks screen, choose the activity that you need to export along with the workflow.
Click Next.
In the Select Script Modules screen, click Next.
In the Exported By field, enter the name or email ID of the user who is responsible for exporting the activity.
In the Comment field, enter the comment that needs to be included with the exported activity.
In the Exported File Name field, enter the name for the exported activity.
Click Export.
The activity is exported to your local system.
What to Do Next
Import the updated activity into Cisco UCS Director.
Importing an Activity
You can import an activity that was exported to your local system to Cisco UCS Director after you update
the activity.
Cisco UCS Director Orchestration Guide, Release 5.3
82
Beta Draft
Managing Activities
Deleting an Activity
Before You Begin
You must export an activity to the local system from Cisco UCS Director.
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Step 8
On the menu bar, choose Policies > Orchestration.
Click the Workflows tab.
Click Import.
In the Import dialog box, click Browse and choose an exported file for upload.
Click Upload.
A successful file upload message appears.
Click OK.
Click Next.
In the Import Policies screen, choose one of the following option from the Custom Tasks drop-down list:
• Replace
• Keep Both
• Skip
Step 9
Click Import.
The activity is imported and is immediately available for use in the workflow.
Deleting an Activity
Step 1
Step 2
Step 3
Step 4
Step 5
On the menu bar, choose Policies > Orchestration.
Click the Activites tab.
Select the activity that needs to be deleted.
Click Delete.
The activity dialog box appears to confirm deletion of the activity.
Click Delete.
Example: Onboarding Tenants using an Activity
A common administration scenario in Cisco UCS Director is to onboard tenants. The underlying workflow
for onboarding a tenant would consist of several tasks such as:
• Create tenant
• Prepare the host for application
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
83
Managing Activities
Example: Onboarding Tenants using an Activity
• Create volume
• Mount Datastore
• Add to groups
From the above tasks, you can create a datastore creation workflow consisting of the Create Volume and
Mount Datastore tasks. In addition, you can have a separate workflow for each type of host, say, Create
NetApp Datastore and Create EMC Datastore. Then, you can create a single activity, say, Create Datastore
and associate it with either the Create NetApp Datastore workflow or the Create EMC datastore workflow.
When you execute the activity, based on your context input matching condition, either one of the workflows
can be triggered. In this way, a single activity (Create Datastore) can be used for multiple use case scenarios
(Create NetApp Datastore or Create EMC Datastore).
Cisco UCS Director Orchestration Guide, Release 5.3
84
Beta Draft
CHAPTER
7
Using Macros
This chapter contains the following sections:
• About VM Name Template Customization, page 85
• About VM Template and Hostname Variables, page 87
• About Application Codes, page 87
• About Macro Orchestration, page 88
About VM Name Template Customization
The Cisco UCS Director Macro feature allows you to customize a VM name and VM hostname using variables
provided by the application. VM name and VM hostname creation is automated by using the variables in the
system policy.
Cisco UCS Director also allows automatic creation of VM names and VM hostnames during VM provisioning.
The VM name templates and VM hostname templates are available under the VMware system policy.
Using the VM Name Template
Step 1
Step 2
Step 3
Step 4
On the menu bar, choose Policies > Virtual/Hypervisor Policies > Service Delivery.
Choose the VMware System Policy tab.
Click Add (+).
Step 5
In the VM Name Template field, you can use the following variables. Each variable must begin with a dollar sign ($)
and be enclosed in braces ({}), like this: ${VARIABLE_NAME}. For example: vm-${GROUP_NAME}-SR${SR_ID}.
Begin entering values in the System Policy Information screen as described in Configuring a System Policy in the Cisco
UCS Director Administrator Guide.
Variable
Description
CLOUD_NAME
The name of the cloud that is being deployed.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
85
Using Macros
Using the VM Name Template
Step 6
Variable
Description
GROUP_NAME
The name of the VM group.
CATALOG_NAME
The name of the catalog item or entry.
USER
Your user ID.
SR_ID
The service request ID.
COMMENTS
Your comments.
PROFILE_NAME
The name of the system policy.
LOCATION
The name of the location as specified during cloud creation.
UNIQUE_ID
A random ID to make the name unique.
APPCODE
The application code that is the value specified during
catalog creation.
COST_CENTER
The cost center group or customer organization specified
during the group or customer organization creation.
#
The index character. The index character can be added
anywhere in the VM name template to create an index
number in the VM name. The index character can be given
in multiples. For example, if a VM name template is
vm-${GROUP_NAME}##, VM name is vm-ABCD01 for
the first VM provisioned with this policy. The group name
is ABCD and 01 replaces ##.
Note
The index increments only when the resultant
name is a duplicate of an existing VM name. For
example, if ${SR_ID} is used in the VM name,
the resultant VM names are unique because the
unique SR ID number is incremented. In this case
the (#) does not increment.
The same variables can be used in the Host Name Template field on the same page.
What to Do Next
Complete the System Policy Information screen as described in Configuring a System Policy in the Cisco
UCS Director Administrator Guide.
Cisco UCS Director Orchestration Guide, Release 5.3
86
Beta Draft
Using Macros
About VM Template and Hostname Variables
About VM Template and Hostname Variables
The VM template and hostnames can be automatically generated using a set of variable names. Each variable
must be enclosed in ${VARIABLE}. The allowed variable names are as follows:
Name
Description
${CLOUD_NAME}
The name of the cloud used for VM provisioning.
${VM_NAME}
The name of the VM.
${GROUP_NAME}
The name of the group to which the VM belongs.
${CATALOG_NAME}
The name of the catalog item used for VM
provisioning.
${USER}
The requesting user ID.
${SR_ID}
The service request ID.
${COMMENTS}
The comments specified by the requesting user.
${COST_CENTER}
The cost center that is associated with a group or
customer organization. This is specified during group
or customer organization creation.
${APPCODE}
The application code that is specified during catalog
creation.
About Application Codes
The application code specified during catalog creation can be used in the VM name. By specifying an application
code for a catalog, the value can be called in the VMware system policy by adding ${APPCODE} as a variable.
Typically, APPCODE can be used to a type of application such as DB, WS, SQL, and so on. The application
type in the VM name or hostname allows you to easily identify the type of the application within the VM.
For example, vm-${GROUP_NAME}-${APPCODE}-##. For the first VM provisioined using this system
policy the VM name is vm-Demo-DB-01 (Demo is group name, DB is Application code specified in Catalog
and 01 is ##) The next VM name will be vm-Demo-DB-02 .
For example, vm-${GROUP_NAME}##, the VM name is vm-HR01 for the first VM provisioned with this
policy (in here the group name is HR and 01 represents ##). If a new VM is provisioned for the same group
and catalog, that VM is named vm-HR02.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
87
Using Macros
About Macro Orchestration
About Macro Orchestration
During the creation of a Cisco UCS Director workflow, you can use macros for Workflow Task inputs.
During the runtime execution of the workflow, the Orchestrator replaces the values for each macro before
executing the associated action.
Each Cisco UCS Director workflow typically has the following components:
• Workflow inputs that are defined by the administrator.
• Tasks that are drag-and-dropped by the administrator from a predefined set of the task library. Each task
has an ID, set of inputs, and outputs.
Macros may be used for each task input. Any workflow level input or a previous task output can be used as
a macro in a subsequent task. For example, a workflow has two inputs labeled Enter Disk Size , and Max
Snapshots , and it has two tasks with IDs task1 and task2. Any input values to task1 or task2 that takes
free-form input can use those two values as macros:
• ${Enter Disk Size}
• ${Max Snapshots}
Each variable name is exactly the same as the label associated with the input. task2 can also use the output
of task1. If task1 has two output variables, OUTPUT_VOLUME_NAME and OUTPUT_VOLUME_SIZE,
then task2 may refer to them both using the syntax ${task1.OUTPUT_VOLUME_NAME} and
${task1.OUTPUT_VOLUME_SIZE}. Each input field may refer to more than one macro.
• SR_ID: ID: the ID of the current service request
• PARENT_SR_ID: the Parent SR ID of the current service request (if applicable).
For workflows that are executed in the context of a VM, these additional variables can be used in a macro:
Name
Description
${VM_NAME}
The name of the VM.
${VM_IPADDRESS}
The IP address of the VM.
${VM_STATE}
The state of the VM (ON or OFF).
${VM_STATE_DETAILS}
The state of the VM, power-on or power-off.
${VM_PARENT}
The ESX server or host node that is hosting the VM.
${VM_CLOUD}
The name of the cloud used for VM provisioning.
${VM_HOSTNAME}
The hostname of the VM
${VM_GROUP_NAME}
The name of the group to which the VM belongs.
${VM_GROUP_NAME}
The group ID to which the VM belongs.
Cisco UCS Director Orchestration Guide, Release 5.3
88
Beta Draft
Using Macros
About Macro Orchestration
Name
Description
${VM_CATALOG_ID}
The catalog ID used for VM.
${VM_ID}
The VM ID of the chosen VM.
${VM_SR_ID}
The VM service request ID.
${VM_COMMENTS}
The comments specified by the requesting user.
${VM_VDC_NAME
The name of the vDC.
${VM_VDC_ID}
The vDC ID.
${VM_TYPE}
The type of the VM.
${VM_SCHED_TERM
The scheduled termination time for the VM.
Cisco UCS Director Orchestration Guide, Release 5.3
Beta Draft
89
Using Macros
About Macro Orchestration
Cisco UCS Director Orchestration Guide, Release 5.3
90
Beta Draft
© Copyright 2026 Paperzz