<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Function qith query, function using ontap powershell api,... in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Function-qith-query-function-using-ontap-powershell-api/m-p/103408#M18291</link>
    <description>&lt;P&gt;1. &amp;nbsp;There is a good post on how&amp;nbsp;to update information in playground via a command code.&lt;/P&gt;&lt;P&gt;Please look into this post.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Articles-and-Resources/WFA-command-to-insert-update-a-record-in-the-Playground-database-of-MySQL/ta-p/87274" target="_blank"&gt;http://community.netapp.com/t5/OnCommand-Storage-Management-Software-Articles-and-Resources/WFA-command-to-insert-update-a-record-in-the-Playground-database-of-MySQL/ta-p/87274&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The command works well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additional reading:&lt;/P&gt;&lt;P&gt;Also read about invokeMySQLQuery in Workflow Developers guide.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Articles-and-Resources/How-to-create-your-own-custom-WFA-dictionary-to-retrieve-data-from-your-own/ta-p/87323" target="_blank"&gt;http://community.netapp.com/t5/OnCommand-Storage-Management-Software-Articles-and-Resources/How-to-create-your-own-custom-WFA-dictionary-to-retrieve-data-from-your-own/ta-p/87323&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. &amp;nbsp;Regarding resizing volume.&lt;/P&gt;&lt;P&gt;You can look into some of the workflows posted here, you may have to tweak to get exactly what you need.&lt;/P&gt;&lt;P&gt;Specifically "Manage SnapMirror-SnapVault Cascade Relationship" might be helpful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please read the help file of the workflow to get more details.&lt;/P&gt;&lt;P&gt;&lt;A href="http://automationstore.netapp.com/pack-list.shtml" target="_blank"&gt;http://automationstore.netapp.com/pack-list.shtml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Instead of functions, WFA uses SQL queries to get the related information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let us know if you have any specific questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Apr 2015 06:15:28 GMT</pubDate>
    <dc:creator>abhit</dc:creator>
    <dc:date>2015-04-18T06:15:28Z</dc:date>
    <item>
      <title>Function qith query, function using ontap powershell api,...</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Function-qith-query-function-using-ontap-powershell-api/m-p/103373#M18289</link>
      <description>&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to persuade our manageemnt about qualities of WFA software but I cannot resolve few issues.&lt;/P&gt;&lt;P&gt;Tried to find it on this forum but failed...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;I want to configure DNS, SMTP, SNMP servers according the location of datacenter.&lt;/P&gt;&lt;P&gt;Input for operator will use pull down list of sites configured as “enum list”.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fine. Then I would like to use as argument of command configuring DNS server some function like &lt;FONT face="courier new,courier"&gt;getDnsServer(location)&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;I can do it by simple stupid way:&lt;/P&gt;&lt;PRE&gt;if (location == ’NY’)
{
return “10.10.10.1”;
}
if (location == ‘LA’)
{
return “10.10.20.1”;
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;…&lt;/P&gt;&lt;P&gt;And write it for few tents or even hundreds of location. Any new location will require code modification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But we have &lt;EM&gt;playground &lt;/EM&gt;database. I want to populate some table by name servers according the location&lt;/P&gt;&lt;P&gt;(and even create D&lt;EM&gt;ata Source&lt;/EM&gt; for it) and use simple query. But queries are available only in filters.&lt;/P&gt;&lt;P&gt;How to deal with this situation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;I want to (within one workflow) resize volume together with resizing of snapmirror destination volume .&lt;/P&gt;&lt;P&gt;There is existing dictionary object for volume – nothing to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no snapmirror object for 7mode, just for cm_storage (why?) but we can clone and/or create it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I need a function to get &lt;EM&gt;Array&lt;/EM&gt; and &lt;EM&gt;Volume&lt;/EM&gt; of snapmirror destination of particular source &lt;EM&gt;Array,Volume&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;Ontap powershell API has the right fuctions. But I cannot use them in WFA functions. I cannot use them in WFA filter.&lt;/P&gt;&lt;P&gt;I can use them only in WFA commands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to create “WFA command” serving as function? To return pair Dest&lt;EM&gt;Array,DestVolume&lt;/EM&gt; based on input&lt;/P&gt;&lt;P&gt;parameters &lt;EM&gt;Array,Volume&lt;/EM&gt;? I cannot find existing command example with playing with return values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or just anything I will be able to use as:&lt;/P&gt;&lt;P&gt;(DestArray, DestVolume) = getSnapmirrorDestination(SrcArray, SrcVolume)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Rado&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 04:32:48 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Function-qith-query-function-using-ontap-powershell-api/m-p/103373#M18289</guid>
      <dc:creator>RadovanTuran</dc:creator>
      <dc:date>2025-06-05T04:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Function qith query, function using ontap powershell api,...</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Function-qith-query-function-using-ontap-powershell-api/m-p/103383#M18290</link>
      <description>&lt;P&gt;Hi Rado,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are some thoughts&amp;nbsp;on these two topics.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=======&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1 - Tables options in WFA&lt;/STRONG&gt; - 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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;----------&lt;/P&gt;&lt;P&gt;Option-1A - Make an MVEL table and use the &amp;nbsp;MVEL function getValueFrom2DByRowKey() -&amp;nbsp;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 -&amp;gt; Constants tab &amp;nbsp;to create a constant and have it's value be the string which is formatted as the MVEL DataCenter table, say:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Name: &lt;STRONG&gt;DC_SERVERS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Description: &lt;STRONG&gt;Table of DataCenters: DataCenter ~&amp;nbsp;DNSserver ~ SMTPserver ~ SNMPserver&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Value: &lt;STRONG&gt;'NY~10.10.10.1~10.10.10.2~10.10.10.3,LA~10.10.20.1~10.10.20.2~10.10.20.3'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;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:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;getValueFrom2DByRowKey(DC_SERVERS,'NY',2) - to get DNS&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;getValueFrom2DByRowKey(DC_SERVERS,'NY',3) - to get SMTP&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;getValueFrom2DByRowKey(DC_SERVERS,'NY',4) - to get SNMP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To make&amp;nbsp;this easier to deal with I'd create other contants, for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Name:&amp;nbsp;&lt;STRONG&gt;DC_SELECTED&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Description:&amp;nbsp;&lt;STRONG&gt;User Input variable that will be defined as enum list of sites&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Value:&amp;nbsp;&lt;STRONG&gt;$dcSelect&lt;/STRONG&gt;&amp;nbsp;(in user inputs this would be you enum list with, say, NY,LA)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Name:&amp;nbsp;&lt;STRONG&gt;COMPUTED_DNS_SERVER&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Description:&amp;nbsp;&lt;STRONG&gt;The DNS Server for this data center&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Value:&amp;nbsp;&lt;SPAN&gt;g&lt;STRONG&gt;etValueFrom2DByRowKey(DC_SERVERS,DC_SELECTED,2)&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... etc for SMTP, SNMP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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 ,,,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;----------&lt;/P&gt;&lt;P&gt;Option-1B -&amp;nbsp;create a WFA Cache table using: schema, dictionary and data source&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No real need to use the playground db for this. The playground db is really reserved for cases where you need&amp;nbsp;to be able to write to tables. You're requirement just needs to have a workflow read from a&amp;nbsp;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 ( &lt;A href="http://bit.ly/1CTFdPF" target="_blank"&gt;http://bit.ly/1CTFdPF&lt;/A&gt; ) 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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh, and queries/filter ... yes, you'll have to create a filter or two that&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;========&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2 - Determining destination volume&lt;/STRONG&gt; - The 7-Mode &lt;STRONG&gt;storage.vsm&lt;/STRONG&gt; 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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2015 14:46:09 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Function-qith-query-function-using-ontap-powershell-api/m-p/103383#M18290</guid>
      <dc:creator>korns</dc:creator>
      <dc:date>2015-04-17T14:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Function qith query, function using ontap powershell api,...</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Function-qith-query-function-using-ontap-powershell-api/m-p/103408#M18291</link>
      <description>&lt;P&gt;1. &amp;nbsp;There is a good post on how&amp;nbsp;to update information in playground via a command code.&lt;/P&gt;&lt;P&gt;Please look into this post.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Articles-and-Resources/WFA-command-to-insert-update-a-record-in-the-Playground-database-of-MySQL/ta-p/87274" target="_blank"&gt;http://community.netapp.com/t5/OnCommand-Storage-Management-Software-Articles-and-Resources/WFA-command-to-insert-update-a-record-in-the-Playground-database-of-MySQL/ta-p/87274&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The command works well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additional reading:&lt;/P&gt;&lt;P&gt;Also read about invokeMySQLQuery in Workflow Developers guide.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Articles-and-Resources/How-to-create-your-own-custom-WFA-dictionary-to-retrieve-data-from-your-own/ta-p/87323" target="_blank"&gt;http://community.netapp.com/t5/OnCommand-Storage-Management-Software-Articles-and-Resources/How-to-create-your-own-custom-WFA-dictionary-to-retrieve-data-from-your-own/ta-p/87323&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. &amp;nbsp;Regarding resizing volume.&lt;/P&gt;&lt;P&gt;You can look into some of the workflows posted here, you may have to tweak to get exactly what you need.&lt;/P&gt;&lt;P&gt;Specifically "Manage SnapMirror-SnapVault Cascade Relationship" might be helpful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please read the help file of the workflow to get more details.&lt;/P&gt;&lt;P&gt;&lt;A href="http://automationstore.netapp.com/pack-list.shtml" target="_blank"&gt;http://automationstore.netapp.com/pack-list.shtml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Instead of functions, WFA uses SQL queries to get the related information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let us know if you have any specific questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2015 06:15:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Function-qith-query-function-using-ontap-powershell-api/m-p/103408#M18291</guid>
      <dc:creator>abhit</dc:creator>
      <dc:date>2015-04-18T06:15:28Z</dc:date>
    </item>
  </channel>
</rss>

