Active IQ Unified Manager Discussions

Parameters Mapping in a Command

kiessl
4,348 Views

I'm starting to work with WFA. Trying to build my first workflows I wonder how the "parameters mapping of a command" is working.

Is there some documentation available (besides online help)?

I want to know

- how is parameter mapping used

- what means type, attribute, object name

- what influences do type, attribute, object name have to my workflow

- what happens, if I DO NOT define parameter mappings

- what happens, if I DO define parameter mappings

- where is object name used in the workflow

- can I map (e. g.) a "volume name" parameter to a type of storage.lun and attribute volume.name with an object name of "LUN"? And what causes this to my workflow?

Thanks for your help!

1 ACCEPTED SOLUTION

shailaja
4,348 Views

Hi,

Let me provide some details on what command parameter mapping means and guidelines on its usage.

This is something we refer to when designing certified commands released in WFA.

Note: There will be exceptions to these guidelines depending on the design of the command.


Hope this helps.

Thanks,

Shailaja

1.1.1 Command Parameter Mapping Guidelines

A command has a number of parameters and they are mapped in “Parameters Mapping” tab when you edit a command. This mapping has to be done based on the following guidelines.

  • Command parameters are mapped to specific attributes and references of dictionary entries.
  • Command parameter mapping defines the way the parameters to execute a command (CommandDetails - rectangular boxes you see in the designer) will be defined in the workflow.
  • All mapped command parameters appear in different tabs during workflow design for that command’s details and the tab will be named according to “ObjectName” in the command mapping definition.
  • All unmapped parameters appear in the “Other parameters” tab of the Command Details in the simplified designer.

The rules for mappings of command parameters to dictionary entries and its attributes have been derived based on:

  • Commands can generally be categorized into different categories from the perspective of the functionality it supports. The mapping of command parameters depends on the type of functionality the command supports.
  • Depending on the way the command will be represented in the workflow designer.

Example Command parameter mapping and the way it is displayed in workflow designer.

  

#

Command Category

Rules for mapping

1

Create a new object

General flow of usage:

  1. Find parent objects, define new object
  2. Find if object exists, if not create it.
  • Relevant parameters of object being created are mapped to that dictionary entry.
  • Parent object is also mapped through references of the dictionary entry being created
  • In general, when adding a new parameter to a “Create” type of command, ensure that the relevant attribute is also present in the dictionary entry, if it does not fall in the Exception scenario described below.
  • Examples for creation commands
    • Example: “Create Volume” command
    • Example: “Create LUN” command
  • Exception 1:  Some objects that are created do not have a corresponding dictionary entry, and in that scenario, only the parent object is mapped to the relevant parent dictionary entry.
    • Example:”Create VIF” command - Only Array can be mapped to Array dictionary entry.

  • Exception 2: Parameters applicable purely for creation are unmapped. They appear in Other Parameters tab in Command Details during workflow design.
    • Example: “ExecutionTimeout” parameter in “Create/Resize Aggregate” command is an unmapped parameter.

2

Update an object

General flow of usage: Find object and update attributes

  • Object being updated is mapped to dictionary entry.
  • Basic attributes being updated for the object must be unmapped parameters.
  • If the parameter being updated is an association with another object type (dictionary entry), then it should be mapped to a new instance of that dictionary entry.

  • Example: “Set Volume State” command: Volume is mapped, but the new State will be unmapped.
  • Example: “Resize Volume” command: Volume is mapped, but size parameters will be unmapped.
  • Example: "Modify Volume" (Clustered Data ONTAP) command: Volume is mapped, Export Policy is mapped to a new object name "Export_Policy" and not mapped to "volume.export_policy.name"

3

Remove object

General flow of usage: Find object, Delete it

  • Object being deleted is mapped to dictionary entry.

  • Example: “Remove Volume” command: Volume to be deleted is mapped to relevant attributes and references of Volume dictionary entry.

4

Commands dealing with optional parent and child objects.

  • Do not map any mandatory parameter of a command as a reference from an optional parameter of the command. This is especially true, if a command deals with optional child objects of a specific parent object. Then the child and parent object should be mapped explicitly.

  • Example: “Stop Deduplication Jobs” command: The command stops a running deduplication job on a specific volume (if specified along with Array) or on all volumes of the given Array. Array parameter should be mapped directly to Array dictionary entry and not to Volume.Array because Volume is an optional parameter in this command.
  • If a parent and child relationship exists between dictionary entries at the logical level, but not between the actual instances in a specific command, then those objects should be separately mapped.

  • Example: “Move Volume” Command: Volume is being moved from its current parent aggregate to a new destination aggregate. So, Volume parameters are mapped to a Volume dictionary entry, and the destination aggregate parameters are mapped separately to the Aggregate dictionary entry (and not as volume.aggregate.name)

5

Updating/Add/Removing associations between objects

  • Map both association objects to relevant dictionary entries.

  • Example: “Add Volume to Vfiler” command: Volume and Vfiler parameters are mapped to relevant attributes of Volume and Vfiler dictionary entries.
  • Example: “Add Volume to Dataset” command: Volume and Dataset parameters are mapped to relevant attributes of Volume and Dataset dictionary entries.

View solution in original post

3 REPLIES 3

shailaja
4,349 Views

Hi,

Let me provide some details on what command parameter mapping means and guidelines on its usage.

This is something we refer to when designing certified commands released in WFA.

Note: There will be exceptions to these guidelines depending on the design of the command.


Hope this helps.

Thanks,

Shailaja

1.1.1 Command Parameter Mapping Guidelines

A command has a number of parameters and they are mapped in “Parameters Mapping” tab when you edit a command. This mapping has to be done based on the following guidelines.

  • Command parameters are mapped to specific attributes and references of dictionary entries.
  • Command parameter mapping defines the way the parameters to execute a command (CommandDetails - rectangular boxes you see in the designer) will be defined in the workflow.
  • All mapped command parameters appear in different tabs during workflow design for that command’s details and the tab will be named according to “ObjectName” in the command mapping definition.
  • All unmapped parameters appear in the “Other parameters” tab of the Command Details in the simplified designer.

The rules for mappings of command parameters to dictionary entries and its attributes have been derived based on:

  • Commands can generally be categorized into different categories from the perspective of the functionality it supports. The mapping of command parameters depends on the type of functionality the command supports.
  • Depending on the way the command will be represented in the workflow designer.

Example Command parameter mapping and the way it is displayed in workflow designer.

  

#

Command Category

Rules for mapping

1

Create a new object

General flow of usage:

  1. Find parent objects, define new object
  2. Find if object exists, if not create it.
  • Relevant parameters of object being created are mapped to that dictionary entry.
  • Parent object is also mapped through references of the dictionary entry being created
  • In general, when adding a new parameter to a “Create” type of command, ensure that the relevant attribute is also present in the dictionary entry, if it does not fall in the Exception scenario described below.
  • Examples for creation commands
    • Example: “Create Volume” command
    • Example: “Create LUN” command
  • Exception 1:  Some objects that are created do not have a corresponding dictionary entry, and in that scenario, only the parent object is mapped to the relevant parent dictionary entry.
    • Example:”Create VIF” command - Only Array can be mapped to Array dictionary entry.

  • Exception 2: Parameters applicable purely for creation are unmapped. They appear in Other Parameters tab in Command Details during workflow design.
    • Example: “ExecutionTimeout” parameter in “Create/Resize Aggregate” command is an unmapped parameter.

2

Update an object

General flow of usage: Find object and update attributes

  • Object being updated is mapped to dictionary entry.
  • Basic attributes being updated for the object must be unmapped parameters.
  • If the parameter being updated is an association with another object type (dictionary entry), then it should be mapped to a new instance of that dictionary entry.

  • Example: “Set Volume State” command: Volume is mapped, but the new State will be unmapped.
  • Example: “Resize Volume” command: Volume is mapped, but size parameters will be unmapped.
  • Example: "Modify Volume" (Clustered Data ONTAP) command: Volume is mapped, Export Policy is mapped to a new object name "Export_Policy" and not mapped to "volume.export_policy.name"

3

Remove object

General flow of usage: Find object, Delete it

  • Object being deleted is mapped to dictionary entry.

  • Example: “Remove Volume” command: Volume to be deleted is mapped to relevant attributes and references of Volume dictionary entry.

4

Commands dealing with optional parent and child objects.

  • Do not map any mandatory parameter of a command as a reference from an optional parameter of the command. This is especially true, if a command deals with optional child objects of a specific parent object. Then the child and parent object should be mapped explicitly.

  • Example: “Stop Deduplication Jobs” command: The command stops a running deduplication job on a specific volume (if specified along with Array) or on all volumes of the given Array. Array parameter should be mapped directly to Array dictionary entry and not to Volume.Array because Volume is an optional parameter in this command.
  • If a parent and child relationship exists between dictionary entries at the logical level, but not between the actual instances in a specific command, then those objects should be separately mapped.

  • Example: “Move Volume” Command: Volume is being moved from its current parent aggregate to a new destination aggregate. So, Volume parameters are mapped to a Volume dictionary entry, and the destination aggregate parameters are mapped separately to the Aggregate dictionary entry (and not as volume.aggregate.name)

5

Updating/Add/Removing associations between objects

  • Map both association objects to relevant dictionary entries.

  • Example: “Add Volume to Vfiler” command: Volume and Vfiler parameters are mapped to relevant attributes of Volume and Vfiler dictionary entries.
  • Example: “Add Volume to Dataset” command: Volume and Dataset parameters are mapped to relevant attributes of Volume and Dataset dictionary entries.

kiessl
4,348 Views

Thanks for your reply.

This answers my questions but opens a lot of new ones. For example:

- what are dictionary objects and how are they used

- attributes/references to dict. objects?

- how to choose the right dict. object?

Is there more documentation available (point 1.1.1 implies that there is more)?

shailaja
4,348 Views

Hi,

- what are dictionary objects and how are they used

- attributes/references to dict. objects?

- how to choose the right dict. object?

A dictionary entry is the definition of an object type that is supported by WFA. Each dictionary entry

represents an object type and its relationship in the supported storage and storage-related

environments. A dictionary object consists of a list of attributes, which might be type checked, and a

dictionary object with complete values describes an object instance of a type. In addition, the

reference attributes describe the relationship of the object with the environment; for example, a

volume dictionary object has many attributes, such as name, size_mb, and volume_guarantee. In

addition, the volume dictionary object includes references to the aggregate and the array containing

the volume in the form of array_id and aggregate_id.

Also, the video in https://communities.netapp.com/videos/3151 provides some details.

Is there more documentation available (point 1.1.1 implies that there is more)?

[Shailaja] There will be more documentation on this area as part of 2.1 WFA release which will be in a few weeks.

Thanks,

Shailaja

Public