Data Infrastructure Management Software 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

Re: WFA Return Parameters LUN ID

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.

Re: WFA Return Parameters LUN ID

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

Earn Rewards for Your Review!
GPI Review Banner
All Community Forums
Public