<?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 WFA Create IPSPACE in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152191#M27310</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;has someone already a Command which create an IPSpace?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was wondering that this is not included in the NetApp Packs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Greets Pascal&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 12:09:12 GMT</pubDate>
    <dc:creator>PMensing</dc:creator>
    <dc:date>2025-06-04T12:09:12Z</dc:date>
    <item>
      <title>WFA Create IPSPACE</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152191#M27310</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;has someone already a Command which create an IPSpace?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was wondering that this is not included in the NetApp Packs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Greets Pascal&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 12:09:12 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152191#M27310</guid>
      <dc:creator>PMensing</dc:creator>
      <dc:date>2025-06-04T12:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: WFA Create IPSPACE</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152197#M27311</link>
      <description>&lt;P&gt;Hi Pascal,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some WFA command code in PowerShell to create an IPSpace.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Param(
   [Parameter(Mandatory=$True, HelpMessage="The cluster name or IP Address")]
   [String]$Cluster,
   [Parameter(Mandatory=$True, HelpMessage="The IPSpace name")]
   [String]$IPSpace,
   [Parameter(Mandatory=$False, HelpMessage="The maximum number of ZAPI retry attempts")]
   [Int]$ZapiRetryCount
)
#'------------------------------------------------------------------------------
#'Connect to the cluster
#'------------------------------------------------------------------------------
Connect-WfaCluster $Cluster
#'------------------------------------------------------------------------------
# Create the IPSpace.
#'------------------------------------------------------------------------------
Get-WFALogger -Info -Message "Creating IPSpace ""$IPSpace"" on cluster ""$Cluster"""
Try{
   [String]$command = "New-NcNetIpspace -Name $IPSpace "
   If($ZapiRetryCount){
      [String]$command += "-ZapiRetryCount $ZapiRetryCount "
   }
   [String]$command += "-ErrorAction Stop"
   Invoke-Expression -Command $command -ErrorAction Stop
   Get-WFALogger -Info -Message "Executed Command`: $command"
   Get-WFALogger -Info -Message "Created IPSpace ""$IPSpace"" on cluster ""$Cluster"""
}Catch{
   Get-WFALogger -Error -Message $("Failed Executing Command`: $command. Error " + $_.Exception.Message)
   Throw "Failed creating IPSpace ""$IPSpace"" on cluster ""$Cluster"""
}
#'------------------------------------------------------------------------------&lt;/PRE&gt;
&lt;P&gt;Hope that helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 04:18:05 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152197#M27311</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2019-11-08T04:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: WFA Create IPSPACE</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152198#M27312</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;it works. Thank you for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&amp;nbsp;Pascal&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 07:20:26 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152198#M27312</guid>
      <dc:creator>PMensing</dc:creator>
      <dc:date>2019-11-08T07:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: WFA Create IPSPACE</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152201#M27313</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;the creation of the IPSpace works fine but now i have an Problem with the Reservation. My Reservation SQL Statement is this one:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;INSERT   
INTO
    cm_storage.ipspace
    SELECT
        NULL AS id,
        '${IPSpaceName}' AS name,
        cluster.id AS cluster_id           
    FROM
        cm_storage_cluster,
        cm_storage.ipspace          
    WHERE
        cluster.name = '${ClusterName}'                 
        AND ipspace.cluster_id = cluster.id&lt;/PRE&gt;
&lt;P&gt;Unfortunately it didn't work like it should do. Can someone find any mistake in my SQL Query ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks Pascal&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 12:52:17 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152201#M27313</guid>
      <dc:creator>PMensing</dc:creator>
      <dc:date>2019-11-08T12:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: WFA Create IPSPACE</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152215#M27321</link>
      <description>&lt;P&gt;Hi Pascal,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following SQL code worked for me:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Reservation:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;INSERT       
INTO
    cm_storage.ipspace
    SELECT
        NULL AS id,
        '${IPSpace}' AS 'name',
        cluster.id AS 'cluster_id'                               
    FROM
        cm_storage.cluster                       
    WHERE
        (
            cluster.primary_address = '${Cluster}'                       
            OR cluster.name = '${Cluster}'                   
        )&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Verification:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;SELECT
    ipspace.id    
FROM
    cm_storage.cluster,
    cm_storage.ipspace    
WHERE
    ipspace.cluster_id = cluster.id               
    AND ipspace.name = '${IPSpace}'               
    AND (
        cluster.primary_address = '${Cluster}'                   
        OR cluster.name = '${Cluster}'               
    )&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;&lt;/U&gt;Hope that helps?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S...out of curiousity have you considered looking at alternatives such as Ansible? It is much easier to define your configuration than write code and mess around with reservations etc. EG:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="https://docs.ansible.com/ansible/2.9/modules/na_ontap_ipspace_module.html" href="https://docs.ansible.com/ansible/2.9/modules/na_ontap_ipspace_module.html" target="_blank" rel="noopener"&gt;https://docs.ansible.com/ansible/2.9/modules/na_ontap_ipspace_module.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A good place to start is this blog: &lt;A title="https://netapp.io/2018/10/11/getting-started-with-netapp-and-ansible-first-playbook-example/" href="https://netapp.io/2018/10/11/getting-started-with-netapp-and-ansible-first-playbook-example/" target="_blank" rel="noopener"&gt;https://netapp.io/2018/10/11/getting-started-with-netapp-and-ansible-first-playbook-example/&lt;/A&gt; Please let me know if you have any questions?&lt;/P&gt;</description>
      <pubDate>Sat, 09 Nov 2019 00:38:24 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152215#M27321</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2019-11-09T00:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: WFA Create IPSPACE</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152219#M27322</link>
      <description>&lt;P&gt;Hi Pascal,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also another option for you in WFA is to compare the ONTAP version running on the cluster, if 9.6.0 or greater then use the native REST API otherwise use the PSTK\ZAPI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Param(
   [Parameter(Mandatory=$True, HelpMessage="The cluster name or IP Address")]
   [String]$Cluster,
   [Parameter(Mandatory=$True, HelpMessage="The cluster's ONTAP version number")]
   [String]$Version,
   [Parameter(Mandatory=$True, HelpMessage="The IPSpace name")]
   [String]$IPSpace,
   [Parameter(Mandatory=$False, HelpMessage="The maximum number of ZAPI retry attempts")]
   [Int]$ZapiRetryCount
)
#'------------------------------------------------------------------------------
#'Compare ONTAP versions.
#'------------------------------------------------------------------------------
$versionCompare960 = Compare-OntapVersions $Version "9.6.0"
If($versionCompare960 -lt 0){
   [Bool]$UseRestApi = $False
}Else{
   [Bool]$UseRestApi = $True
}
#'------------------------------------------------------------------------------
#'Create the IPSpace using the REST API if running ONTAP 9.6 or greater
#'------------------------------------------------------------------------------
If($UseRestApi){
   [String]$uri = "https://$Cluster/api/network/ipspaces"
   [System.Management.Automation.PSCredential]$Credentials = Get-WfaCredentials -Host $Cluster
   [HashTable]$ips = @{}
   [HashTable]$ips.Add("name", $IPSpace)
   $body = $ips | ConvertTo-Json
   #'---------------------------------------------------------------------------
   #'Create the IPSpace on the cluster.
   #'---------------------------------------------------------------------------
   Get-WFALogger -Info -Message "Creating IPSpace ""$IPSpace"" on cluster ""$Cluster"" using URI ""$uri"""
   Try{
      $response = Invoke-RestMethod -Uri $uri -Method POST -Body $body -ContentType "application/json" -Credential $Credentials -ErrorAction Stop
      Get-WFALogger -Info -Message "Created IPSpace ""$IPSpace"" on cluster ""$Cluster"" using URI ""$uri"""
   }Catch{
      Get-WFALogger -Error -Message $("Failed Creating IPSpace ""$IPSpace"" on cluster ""$Cluster"" using URI ""$uri"". Error " + $_.Exception.Message + " Status Code " + $_.Exception.Response.StatusCode.value__)
      Throw "Failed creating IPSpace ""$IPSpace"" on cluster ""$Cluster"""
   }
}Else{
   #'---------------------------------------------------------------------------
   #'Connect to the cluster and create the IPSpace using the PSTK\ZAPI.
   #'---------------------------------------------------------------------------
   Connect-WfaCluster $Cluster
   Get-WFALogger -Info -Message "Creating IPSpace ""$IPSpace"" on cluster ""$Cluster"""
   Try{
      [String]$command = "New-NcNetIpspace -Name $IPSpace "
      If($ZapiRetryCount){
         [String]$command += "-ZapiRetryCount $ZapiRetryCount "
      }
      [String]$command += "-ErrorAction Stop"
      Invoke-Expression -Command $command -ErrorAction Stop
      Get-WFALogger -Info -Message "Executed Command`: $command"
      Get-WFALogger -Info -Message "Created IPSpace ""$IPSpace"" on cluster ""$Cluster"""
   }Catch{
      Get-WFALogger -Error -Message $("Failed Executing Command`: $command. Error " + $_.Exception.Message)
      Throw "Failed creating IPSpace ""$IPSpace"" on cluster ""$Cluster"""
   }
}
#'------------------------------------------------------------------------------&lt;/PRE&gt;
&lt;P&gt;Hope thats useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 00:00:36 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152219#M27322</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2019-11-11T00:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: WFA Create IPSPACE</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152225#M27324</link>
      <description>&lt;P&gt;Hi Matt,&lt;/P&gt;
&lt;P&gt;thank you for your help. Now it works fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have done some tests with ansible, but there are still missing some features (like logical space reporting), that we need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll take a look on the Rest API Option. Thanks again for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 07:24:55 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Create-IPSPACE/m-p/152225#M27324</guid>
      <dc:creator>PMensing</dc:creator>
      <dc:date>2019-11-11T07:24:55Z</dc:date>
    </item>
  </channel>
</rss>

