The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to register at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Active IQ Unified Manager Discussions

WFA Return Parameters LUN ID

John_Blackwell

Hello All,

 

I have created a workflow which creates a volume/lun and maps it to an existing igroup, I want it to return the LUN id used (as I dont specify it), I have played with return parameters section but I cannot find the parameter value.

Hoping I cannot be the first person wanting to do this?


Any help would be much appreciated?

 

John

2 REPLIES 2

mbeattie

Hi John,

 

There are a number of different methods to achieve the outcome you want. You can find the solutions in the following links:

 

https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/WFA-Return-parameters-from-a-repeated-row/td-p/142696

 

https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/Return-LunId-from-Map-LUN-in-WFA/td-p/138732

 

Hope that helps

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

John_Blackwell

Many thanks for this, so I have cloned the certified command for map lun and added the section at the bottom then in the workflow gone to the return parameters tab and added LunId but for some reason it seems to errors with the below, i guess I am doint something wrong?

 

Failed to evaluate workflow return parameter value 'LunId'
Location: 'LunId' return parameter

 

param (
[parameter(Mandatory=$true, HelpMessage="Cluster name or IP address")]
[string]$Cluster,

[parameter(Mandatory=$true, HelpMessage="Storage Virtual Machine name")]
[string]$VserverName,

[parameter(Mandatory=$true, HelpMessage="Volume name")]
[string]$VolumeName,

[parameter(Mandatory=$false, HelpMessage="Qtree name")]
[string]$QtreeName,

[parameter(Mandatory=$true, HelpMessage="LUN name")]
[string]$LunName,

[parameter(Mandatory=$true, HelpMessage="Name of the igroup to map the initiator to")]
[string]$IgroupName,
[parameter(Mandatory=$false, HelpMessage="LUN id")]
[string]$LunId
)

Get-WFALogger -Info -message $("Connecting cluster : " + $Cluster)
Connect-WfaCluster -Node $Cluster -Vserver $VserverName

if ($QtreeName)
{
$LunPath = "/vol/" + $VolumeName + "/" + $QtreeName + "/" + $LunName
}
else
{
$LunPath = "/vol/" + $VolumeName + "/" + $LunName
}

Get-WFALogger -Info -message $("Mapping LUN : " + $LunName)
if($LunId)
{
Add-NcLunMap -Path $LunPath -InitiatorGroup $IgroupName -VserverContext $VserverName -Id $LunId
}
else
{
Add-NcLunMap -Path $LunPath -InitiatorGroup $IgroupName -VserverContext $VserverName
}

#'------------------------------------------------------------------------------
#' return LunID to WFA
#'------------------------------------------------------------------------------
Add-WfaWorkflowParameter -Name "LunId" -Value $LunId -AddAsReturnParameter $True

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public