Active IQ Unified Manager Discussions

Retrieve Default Gateway From Existing SVM

SeifriedJ

Has anyone found a way in WFA to retrieve the default gateway from an existing SVM? I don't see any dictionary entries that include this information. Am I missing something?

 

Use case is building a workflow to clone an SVM to a new IP space for testing. I need to provide a default gateway in the creation step and would like to limit the manual input. I want to read the source SVM's settings and simply duplicate them.

3 REPLIES 3

Re: Retrieve Default Gateway From Existing SVM

SeifriedJ
 

Re: Retrieve Default Gateway From Existing SVM

mbeattie

Hi,

 

Do you think the following suggestion work for you?

Create a command that accepts the following input paramaters

 

  • SourceCluster
  • SourceVserver
  • DestinationCluster
  • DestinationVserver

The command would perform the following steps:

 

  • Use the "Invoke-NcSystemApi" cmdlet to invoke the "route show -vserver $SourceVserver"
  • Read the CLI output to variablize the destination, gateway and metric
  • Use the "Invoke-NcSystemApi" cmdlet to invoke the "route create -vserver $DestinationVserver -destination $destination -gateway $gateway -metric $metric"

This way you wont have to create a datasource for providing the default route. In your workflow you would place the command after you have created the vserver.

 

Here is an example of using Invoke-NcSystemApi:

 

https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-5P1-released/td-p/138566/page/2

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

Re: Retrieve Default Gateway From Existing SVM

SeifriedJ
Yeah, that's what I was planning to do as a workaround. I was just hoping the gateway information was available somewhere and I was missing it. Thanks.
Earn Rewards for Your Review!
GPI Review Banner
All Community Forums
Public