<?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 Looking for API cache acquisition script example (controller creds) in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Looking-for-API-cache-acquisition-script-example-controller-creds/m-p/68780#M14344</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to use a POSH script to acquire some data directly from controllers that isn't already in the storage schema.&amp;nbsp;&amp;nbsp; I see how to iterate over a list of controllers for a specific DFM server from looking at the performance schema script, but I'm not clear on how to get credentials for the controllers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The controller credentials are configured in WFA (existing workflows operate on them successfully), but when I use &lt;EM&gt;Get-NaCredential $ip&lt;/EM&gt; (where $ip is a controller IP address returned from host-info-list-iter-* on the DFM server), I get an empty result.&amp;nbsp; I'm printing out the IPs, so I know they are correct.&amp;nbsp;&amp;nbsp; Is there a different way to get credentials from within a schema script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2025 06:06:17 GMT</pubDate>
    <dc:creator>abrian</dc:creator>
    <dc:date>2025-06-05T06:06:17Z</dc:date>
    <item>
      <title>Looking for API cache acquisition script example (controller creds)</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Looking-for-API-cache-acquisition-script-example-controller-creds/m-p/68780#M14344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to use a POSH script to acquire some data directly from controllers that isn't already in the storage schema.&amp;nbsp;&amp;nbsp; I see how to iterate over a list of controllers for a specific DFM server from looking at the performance schema script, but I'm not clear on how to get credentials for the controllers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The controller credentials are configured in WFA (existing workflows operate on them successfully), but when I use &lt;EM&gt;Get-NaCredential $ip&lt;/EM&gt; (where $ip is a controller IP address returned from host-info-list-iter-* on the DFM server), I get an empty result.&amp;nbsp; I'm printing out the IPs, so I know they are correct.&amp;nbsp;&amp;nbsp; Is there a different way to get credentials from within a schema script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:06:17 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Looking-for-API-cache-acquisition-script-example-controller-creds/m-p/68780#M14344</guid>
      <dc:creator>abrian</dc:creator>
      <dc:date>2025-06-05T06:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for API cache acquisition script example (controller creds)</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Looking-for-API-cache-acquisition-script-example-controller-creds/m-p/68783#M14345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's some more information.&amp;nbsp;&amp;nbsp; When I posted above, I was trying to use API direct to the controller using New-WFAZapiServer.&amp;nbsp; I've switch to using the ONTAP toolkit to see if I can get further.&amp;nbsp; Unfortunately, running Connect-WFAController in a loop only works for the first iteration, all others fail with invalid credentials.&amp;nbsp;&amp;nbsp; I have confirmed both by running workflows and by using the Test Connection feature of Credentials that the credentials are correct (in fact, they are exactly the same for all 4 controllers in question).&amp;nbsp; Here's some logging showing the behavior (10.61.169.30-33 are controllers that have valid credentials, but only the first works):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;2013-04-03 17:23:24,067 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-14) Volume Root:Starting Volume Root Acquisition&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:28,442 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-28) Volume Root:Scanning filer at 10.61.169.30&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:28,442 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-38) Volume Root:Get-NaCredentials -Host 10.61.169.30&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:28,473 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-4) Volume Root:Connect-NaController (with credentials) -Name 10.61.169.30&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:29,192 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-22) Volume Root:Connected to controller&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:31,035 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-24) Volume Root:Scanning filer at 10.61.169.31&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:31,035 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-20) Volume Root:Get-NaCredentials -Host 10.61.169.31&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:31,082 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-8) Volume Root:Connect-NaController (with credentials) -Name 10.61.169.31&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:31,098 EDT WARN&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-52) Volume Root:Failed to connect to controller: 10.61.169.31, Incorrect credentials for 10.61.169.31.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:31,113 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-64) Volume Root:Scanning filer at 10.61.169.32&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:31,113 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-63) Volume Root:Get-NaCredentials -Host 10.61.169.32&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:31,145 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-23) Volume Root:Connect-NaController (with credentials) -Name 10.61.169.32&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:31,192 EDT WARN&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-16) Volume Root:Failed to connect to controller: 10.61.169.32, Incorrect credentials for 10.61.169.32.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:31,192 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-6) Volume Root:Scanning filer at 10.61.169.33&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:31,207 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-25) Volume Root:Get-NaCredentials -Host 10.61.169.33&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:31,238 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-2) Volume Root:Connect-NaController (with credentials) -Name 10.61.169.33&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;STRONG&gt;2013-04-03 17:23:31,254 EDT WARN&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-17) Volume Root:Failed to connect to controller: 10.61.169.33, Incorrect credentials for 10.61.169.33.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;2013-04-03 17:23:31,395 EDT INFO&amp;nbsp; [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-0.0.0.0-80-9) Volume Root:Volume Root Acquisition Complete&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the relevant code:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;Get-WFALogger -Info -message "Starting Volume Root Acquisition"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;$connectionInfo = get-ConnectionInfo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;$dfm = New-WFAZapiServer -Host $connectionInfo["host"] -Port $connectionInfo["port"] -Credentials $connectionInfo["credentials"] -Type "DFM"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;$filerIPs = Get-DfmFilers($dfm)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;foreach ($ip in $filerIPs) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-WFALogger -message "Scanning filer at $ip" -Info&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $filer = Connect-WFAController -Array $ip&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch [system.exception] {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $err = $_.Exception.Message -replace ".`n", ", "&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-WFALogger -Warn -message "$err" &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!$filer) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-WFALogger -Warn -message "Cannot connect to filer at $ip, empty credentials"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rootVol = Get-NaVolRoot -controller $filer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $domain = (Get-NaOption -controller $filer dns.domainname).value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $name = Get-NaSystemInfo -controller $filer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add-Content $volRootFile ([byte[]][char[]] "\N`t$rootVol`t$name`t$name.$domain`t$ip`n") -Encoding Byte&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;Get-WFALogger -Info -message "Volume Root Acquisition Complete"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;I'm not sure what I could be doing wrong here.&amp;nbsp; It sure looks like Connect-WFAController may be hanging on to some state.&amp;nbsp; If I try to use Get-NaCredentials explicitly, I'm back to the problem I had with the New-WFAZapiServer approach (null creds from &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Get-NaCredentials&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Attached is the Data Source Type.&amp;nbsp; Any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Brian&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 21:42:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Looking-for-API-cache-acquisition-script-example-controller-creds/m-p/68783#M14345</guid>
      <dc:creator>abrian</dc:creator>
      <dc:date>2013-04-03T21:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for API cache acquisition script example (controller creds)</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Looking-for-API-cache-acquisition-script-example-controller-creds/m-p/68789#M14347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try "Get-WfaCredentials -Host &amp;lt;IP&amp;gt;" and see if you are getting Credentials saved with WFA?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 14:06:48 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Looking-for-API-cache-acquisition-script-example-controller-creds/m-p/68789#M14347</guid>
      <dc:creator>karale</dc:creator>
      <dc:date>2013-04-08T14:06:48Z</dc:date>
    </item>
  </channel>
</rss>

