<?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: Delete volume if it contains only one qtree in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Delete-volume-if-it-contains-only-one-qtree/m-p/103090#M18248</link>
    <description>&lt;P&gt;I realized my mistake.&amp;nbsp; I thought the return parameter went into the main list of parameters.&amp;nbsp; I was using the default "Delete Volume" command.&amp;nbsp; I created a copy and used the Get return parameter to accomplish my goal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Roger&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Apr 2015 06:34:07 GMT</pubDate>
    <dc:creator>rogerhinson</dc:creator>
    <dc:date>2015-04-13T06:34:07Z</dc:date>
    <item>
      <title>Delete volume if it contains only one qtree</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Delete-volume-if-it-contains-only-one-qtree/m-p/103072#M18246</link>
      <description>&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a workflow that deletes a qtree if it has no exports, and then deleting the volume if there are no other qtrees in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a command to view the number of qtrees which works when I test it.&amp;nbsp; I added a Return Parameter to the code for the command that shows the number of qtrees (although it also includes the root volume).&amp;nbsp; When I try to use that Return Parameter in the Delete Volume command, I get an error that it's an invalid expression.&amp;nbsp; It doesn't look like the numQtree parameter is being passed back to the workflow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is WFA 2.2 and I'm creating this for 7-Mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't figure out how to attach the exported workflow.&amp;nbsp; It gives me an error that the contents of the attachment doesn't match its file type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any help.&amp;nbsp; I can direct mail to anyone who can look.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the command that is set to have a Return Parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;param (&lt;BR /&gt;&amp;nbsp; [parameter(Mandatory=$true, HelpMessage="Volume name")]&lt;BR /&gt;&amp;nbsp; [string]$VolumeName,&lt;/P&gt;&lt;P&gt;&amp;nbsp; [parameter(Mandatory=$true, HelpMessage="Array IP or name")]&lt;BR /&gt;&amp;nbsp; [string]$Array,&lt;/P&gt;&lt;P&gt;&amp;nbsp; [parameter(Mandatory=$true, HelpMessage="vFiler name")]&lt;BR /&gt;&amp;nbsp; [string]$VFilerName,&lt;/P&gt;&lt;P&gt;&amp;nbsp; [parameter(Mandatory=$false, HelpMessage="Qtree name")]&lt;BR /&gt;&amp;nbsp; [string]$QtreeName&lt;/P&gt;&lt;P&gt;#&amp;nbsp; [parameter(Mandatory=$false, HelpMessage="Qouta Size")]&lt;BR /&gt;#&amp;nbsp; [Long]$QuotaSize&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;# connect to controller&lt;BR /&gt;Connect-WfaController -Array $Array -VFiler $VFilerName&lt;/P&gt;&lt;P&gt;#$policy = Get-NcExportPolicy -VserverContext $VserverName -Name $PolicyName&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;$qtreeQuery =&amp;nbsp; Get-NaQtree -VolumeName $volumeName -QtreeName *&lt;BR /&gt;#$qtreeQuery.vfiler = $VFilerName&lt;BR /&gt;#$qtreeQuery.Volume = $volumeName&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; if($qtreeQuery)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-WFALogger -Info -message $("Check existing qtrees for: " +&amp;nbsp; $volumeName)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $qtreeStatus =&amp;nbsp;&amp;nbsp; Get-NaQtree -VolumeName $volumeName -QtreeName *&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;Get-WFALogger -Info -message $("qtrees exist for volume... : " +&amp;nbsp; $volumeName)&lt;/P&gt;&lt;P&gt;Get-WFALogger -Info -message $("qtreeStatus shows..." + $qtreeStatus)&lt;/P&gt;&lt;P&gt;Get-WFALogger -Info -message $("qtreeStatus shows there are qtrees..." + $qtreeStatus.Count)&lt;/P&gt;&lt;P&gt;Add-WfaWorkflowParameter -Name numQtree -Value $qtreeStatus.Count -AddAsReturnParameter $true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Roger&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 04:36:11 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Delete-volume-if-it-contains-only-one-qtree/m-p/103072#M18246</guid>
      <dc:creator>rogerhinson</dc:creator>
      <dc:date>2025-06-05T04:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Delete volume if it contains only one qtree</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Delete-volume-if-it-contains-only-one-qtree/m-p/103088#M18247</link>
      <description>&lt;P&gt;Can you share the code from the delete volume command where you are trying to read the parameter&amp;nbsp;&lt;SPAN&gt;numQtree.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have had a bug where the files used for these parameters get deleted by our tmp folder cleanup mechanism. This was fixed in 3.0. Can you please check your &amp;lt;WFA Install dir&amp;gt;\jboss\standalone\tmp\wfa\workflow_data directory, It should have a file named &amp;lt;job id&amp;gt;.xml . You can get the job id for your workflow execution from the execution status page in WFA.&amp;nbsp;The&amp;nbsp;parameter "numQtree" and its value should be present in this file. If the file is not present you might be seeing this issue&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2015 03:38:30 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Delete-volume-if-it-contains-only-one-qtree/m-p/103088#M18247</guid>
      <dc:creator>paragp</dc:creator>
      <dc:date>2015-04-13T03:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Delete volume if it contains only one qtree</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Delete-volume-if-it-contains-only-one-qtree/m-p/103090#M18248</link>
      <description>&lt;P&gt;I realized my mistake.&amp;nbsp; I thought the return parameter went into the main list of parameters.&amp;nbsp; I was using the default "Delete Volume" command.&amp;nbsp; I created a copy and used the Get return parameter to accomplish my goal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Roger&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2015 06:34:07 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Delete-volume-if-it-contains-only-one-qtree/m-p/103090#M18248</guid>
      <dc:creator>rogerhinson</dc:creator>
      <dc:date>2015-04-13T06:34:07Z</dc:date>
    </item>
  </channel>
</rss>

