Skip to content

Commit c130b5c

Browse files
author
Ed Munoz
committed
Add NextHop IpAddress to the setroute cmdlet for NVA routes.
1 parent cbba0f3 commit c130b5c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/ServiceManagement/Network/Commands.Network/NetworkClient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,11 +661,12 @@ public AzureOperationResponse DeleteRouteTable(string routeTableName)
661661
return client.Routes.DeleteRouteTable(routeTableName);
662662
}
663663

664-
public AzureOperationResponse SetRoute(string routeTableName, string routeName, string addressPrefix, string nextHopType)
664+
public AzureOperationResponse SetRoute(string routeTableName, string routeName, string addressPrefix, string nextHopType, string ipAddress)
665665
{
666666
NextHop nextHop = new NextHop()
667667
{
668668
Type = nextHopType,
669+
IpAddress = ipAddress
669670
};
670671
SetRouteParameters parameters = new SetRouteParameters()
671672
{

src/ServiceManagement/Network/Commands.Network/Routes/SetAzureRoute.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ public class SetAzureRoute : NetworkCmdletBase
3232
[Parameter(Position = 3, Mandatory = true, HelpMessage = "The new route's next hop type. Valid values are \"VPNGateway\".")]
3333
public string NextHopType { get; set; }
3434

35+
[Parameter(Position = 4, Mandatory = true, HelpMessage = "The new route's next hop ip address." +
36+
" This parameter can only be specifide for \"VirtualAppliance\" next hops.")]
37+
public string NextHopIpAddress { get; set; }
38+
3539
public override void ExecuteCmdlet()
3640
{
37-
WriteObject(Client.SetRoute(RouteTableName, RouteName, AddressPrefix, NextHopType));
41+
WriteObject(Client.SetRoute(RouteTableName, RouteName, AddressPrefix, NextHopType, NextHopIpAddress));
3842
}
3943
}
4044
}

0 commit comments

Comments
 (0)