Active IQ Unified Manager Discussions

Custom command not using WFA cache (SQL DB)

narendrathawani
4,978 Views

How do we pass on a value back to HPOO ?

Let’s say, In a custom command, I increased quotas of qtree.

After increasing quota, I can get the new qtree size

$DiskLimitCurrent = (Get-NaQuota -Path $QtreePath).DiskLimit/1024/1024/1024

How do I send it back to HPOO?

For the variables that are defined and updated in WFA cache (SQL DB), I’m able to send those variables back to HPOO.

3 REPLIES 3

hill
4,978 Views

Hi,

The way you pass information back to the calling system is via the Return Parameters in a workflow.  To access these:

  • edit a workflow
  • click on 'setup' (in WFA 2.1... preferences, if using something prior to WFA 2.1)
  • click on the 'Return Parameters'  tab
  • screenshot:

many of the sample workflows (like above) have return parameters in them as examples.  This one has some conditional statements on what should be returned.

Then you would also need to call WFA via Web Services to get Return Parameters for the workflow execution you're interested in.  Here is a link to the Rest Web Services document:  https://communities.netapp.com/docs/DOC-21510

Hope this helps,

Kevin

narendrathawani
4,978 Views

Kevin,

Thanks for quick response.

I'm not able to return parameters that I define in the command

In command, I find the value of quota of a qtree as follows

$DiskLimitTotal = $DiskLimitExtendBy + $DiskLimitCurrent.

In workflow, I defined the return parameter as follows

Workflow fails with folowing message

hill
4,978 Views

Okay...

What you're trying to do will not work.  You're trying to pass an internal WFA command variable into the Return Parameters.  Unfortunately, the workflow doesn't know what '$DiskLimitTotal' is.  The $ on the variable will make the workflow think it is looking for a User Input to the workflow

Also, at this time, it's not really possible to pass command 'results' to other commands in the workflow... so I'm really not certain you'll be able to do what you're trying to do with the command. 

That said, if you can find a way to pass the result into a command variable (say DiskLimitTotal ... no $), then the workflow will know that variable and it's value... and then you should be able to leverage the return parameters.

I'm not sure if it's possible, but if you do know the values of $DiskLimitExtendBy + $DiskLimitCurrent.... then you could leverage a WFA Function.  You could pass those values into a Function... which would then in turn provide the value to a WFA Command variable (say 'DiskLimitTotal' - no $).  At this point you should be able to use THAT variable in the Return Parameters and return the value you are looking for.

Hope this helps,

Kevin

Public