Active IQ Unified Manager Discussions

Function qith query, function using ontap powershell api,...


Hi all.


I'm trying to persuade our manageemnt about qualities of WFA software but I cannot resolve few issues.

Tried to find it on this forum but failed...



I want to configure DNS, SMTP, SNMP servers according the location of datacenter.

Input for operator will use pull down list of sites configured as “enum list”.


Fine. Then I would like to use as argument of command configuring DNS server some function like getDnsServer(location).

I can do it by simple stupid way:

if (location == ’NY’)
return “”;
if (location == ‘LA’)
return “”;



And write it for few tents or even hundreds of location. Any new location will require code modification.


But we have playground database. I want to populate some table by name servers according the location

(and even create Data Source for it) and use simple query. But queries are available only in filters.

How to deal with this situation?



I want to (within one workflow) resize volume together with resizing of snapmirror destination volume .

There is existing dictionary object for volume – nothing to do.


There is no snapmirror object for 7mode, just for cm_storage (why?) but we can clone and/or create it.


Then I need a function to get Array and Volume of snapmirror destination of particular source Array,Volume.

Ontap powershell API has the right fuctions. But I cannot use them in WFA functions. I cannot use them in WFA filter.

I can use them only in WFA commands.


How to create “WFA command” serving as function? To return pair DestArray,DestVolume based on input

parameters Array,Volume? I cannot find existing command example with playing with return values.


Or just anything I will be able to use as:

(DestArray, DestVolume) = getSnapmirrorDestination(SrcArray, SrcVolume)


Many thanks.





Hi Rado,


Here are some thoughts on these two topics. 




1 - Tables options in WFA - Two ideas here, the first is quick-and-dirty, the second is the better, more extensible, option. You basically want it to be table driven. 



Option-1A - Make an MVEL table and use the  MVEL function getValueFrom2DByRowKey() - An MVEL 2-dimensional table is really just an MVEL string that can be manipulated and search with the 'getValue*' group of built-in MVEL functions. Use the Setup -> Constants tab  to create a constant and have it's value be the string which is formatted as the MVEL DataCenter table, say:



Description: Table of DataCenters: DataCenter ~ DNSserver ~ SMTPserver ~ SNMPserver

Value: 'NY~,LA~'


Tilda separates each row/column, comma separates rows. Quotas around the whole thing. So that gives you a table of DCs with 3 server IP address for each. Then access with:


   getValueFrom2DByRowKey(DC_SERVERS,'NY',2) - to get DNS

   getValueFrom2DByRowKey(DC_SERVERS,'NY',3) - to get SMTP

   getValueFrom2DByRowKey(DC_SERVERS,'NY',4) - to get SNMP


To make this easier to deal with I'd create other contants, for example:



Description: User Input variable that will be defined as enum list of sites 

Value: $dcSelect (in user inputs this would be you enum list with, say, NY,LA)



Description: The DNS Server for this data center 

Value: getValueFrom2DByRowKey(DC_SERVERS,DC_SELECTED,2) 


... etc for SMTP, SNMP


Then at other points in your workflow you can simply reference the COMPUTED_DNS_SERVER constant to specify the DNS server for this data center .. and same for SMTP, SNMP and other items. Then someday hen new data centers added you must tweak User Inputs and Constants tabs ... for each workflow ... so option B, a WFA cache table, is the better option ,,,



Option-1B - create a WFA Cache table using: schema, dictionary and data source


No real need to use the playground db for this. The playground db is really reserved for cases where you need to be able to write to tables. You're requirement just needs to have a workflow read from a table at run-time. Your data source could pull from a spreasheet (csv, excel, etc) or maybe a table in another another SQL DB ... which could be within the playground but not strictly required in your case. Here is a write-up ( ) on a clean and simple method to read from a standard Excel spreadsheet. Since normal WFA user/pswd access to playground gives you R/W to it, you could also just use a SQL-tool to manually populate a playground.dc_servers tables ... but it has been noted that that playground is less secure.


Oh, and queries/filter ... yes, you'll have to create a filter or two that 




2 - Determining destination volume - The 7-Mode storage.vsm table should address the issue? You have to write SQL filter to use it to select/find the destination(s) but it's do'able. You could also drop down into a customer WFA command tha resizes both src and dst and using powershell cmdlets to get to the dst.



1.  There is a good post on how to update information in playground via a command code.

Please look into this post.

The command works well. 


Additional reading:

Also read about invokeMySQLQuery in Workflow Developers guide.


2.  Regarding resizing volume.

You can look into some of the workflows posted here, you may have to tweak to get exactly what you need.

Specifically "Manage SnapMirror-SnapVault Cascade Relationship" might be helpful. 

Please read the help file of the workflow to get more details.

Instead of functions, WFA uses SQL queries to get the related information.


Let us know if you have any specific questions.