Active IQ Unified Manager Discussions

Retrieve Default Gateway From Existing SVM

SeifriedJ
1,899 Views

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.

1 ACCEPTED SOLUTION

mbeattie
1,860 Views

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

3 REPLIES 3

SeifriedJ
1,883 Views
 

mbeattie
1,861 Views

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.

SeifriedJ
1,820 Views
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.
Public