Skip to content

update ps with network SDK with Network 11.1.0 #4265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.16.0.0\lib\net452\Microsoft.Azure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Network, Version=11.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.11.0.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
<Private>True</Private>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.11.1.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<package id="Microsoft.Azure.Graph.RBAC" version="3.4.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Compute" version="16.0.0" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Network" version="11.0.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Network" version="11.1.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Storage" version="4.1.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Test.Framework" version="1.0.6179.26854-prerelease" targetFramework="net45" />
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.6.7-preview" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.Network, Version=11.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.11.0.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.11.1.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Storage">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.4.1.0-preview\lib\net45\Microsoft.Azure.Management.Storage.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Compute" version="16.0.0" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Network" version="11.0.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Network" version="11.1.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Storage" version="4.1.0-preview" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Network, Version=11.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.11.0.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.11.1.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.ResourceManager">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ResourceManager.1.6.0-preview\lib\net452\Microsoft.Azure.Management.ResourceManager.dll</HintPath>
Expand Down Expand Up @@ -537,6 +537,10 @@
<Project>{e1f5201d-6067-430e-b303-4e367652991b}</Project>
<Name>Commands.Resources</Name>
</ProjectReference>
<ProjectReference Include="..\Commands.Network\Commands.Network.csproj">
<Project>{98cfd96b-a6bc-4f15-ae2c-603fc2b58981}</Project>
<Name>Commands.Network</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<package id="Microsoft.Azure.Insights" version="0.13.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Compute" version="16.0.0" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Network" version="11.0.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Network" version="11.1.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Redis" version="3.1.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.ResourceManager" version="1.6.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class AzureApplicationGatewayBackendHttpSettingsBase : NetworkBaseCmdlet
Mandatory = false,
HelpMessage = "Request Timeout. Default value 30 seconds.")]
[ValidateNotNullOrEmpty]
public uint RequestTimeout { get; set; }
public int RequestTimeout { get; set; }


[Parameter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AzureApplicationGatewayConnectionDrainingBase : NetworkBaseCmdlet
Mandatory = true,
HelpMessage = "The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.")]
[ValidateNotNullOrEmpty]
public uint DrainTimeoutInSec { get; set; }
public int DrainTimeoutInSec { get; set; }

public override void ExecuteCmdlet()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Network.Models;
using System;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.Network
Expand Down Expand Up @@ -106,7 +107,15 @@ public PSApplicationGatewayHttpListener NewObject()
httpListener.Name = this.Name;
httpListener.Protocol = this.Protocol;
httpListener.HostName = this.HostName;
httpListener.RequireServerNameIndication = this.RequireServerNameIndication;

if(string.Equals(this.RequireServerNameIndication,"true", StringComparison.OrdinalIgnoreCase))
{
httpListener.RequireServerNameIndication = true;
}
else if(string.Equals(this.RequireServerNameIndication, "false", StringComparison.OrdinalIgnoreCase))
{
httpListener.RequireServerNameIndication = false;
}

if (!string.IsNullOrEmpty(this.FrontendIPConfigurationId))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ public class AzureApplicationGatewayProbeConfigBase : NetworkBaseCmdlet
Mandatory = true,
HelpMessage = "Probe interval in seconds. This is the time interval between two consecutive probes")]
[ValidateNotNullOrEmpty]
public uint Interval { get; set; }
public int Interval { get; set; }

[Parameter(
Mandatory = true,
HelpMessage = "Probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period")]
[ValidateNotNullOrEmpty]
public uint Timeout { get; set; }
public int Timeout { get; set; }

[Parameter(
Mandatory = true,
HelpMessage = "Probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold")]
[ValidateNotNullOrEmpty]
public uint UnhealthyThreshold { get; set; }
public int UnhealthyThreshold { get; set; }

[Parameter(
Mandatory = false,
Expand All @@ -72,7 +72,7 @@ public class AzureApplicationGatewayProbeConfigBase : NetworkBaseCmdlet
Mandatory = false,
HelpMessage = "Minimum number of servers that are always marked healthy. Default value is 0")]
[ValidateRange(0, int.MaxValue)]
public uint MinServers { get; set; }
public int MinServers { get; set; }

[Parameter(
Mandatory = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Network, Version=11.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.11.0.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.11.1.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Data.Edm">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,18 +395,18 @@ public static void Initialize()
});
cfg.CreateMap<CNM.PSApplicationGatewayPathRule, MNM.ApplicationGatewayPathRule>();
cfg.CreateMap<CNM.PSApplicationGatewayUrlPathMap, MNM.ApplicationGatewayUrlPathMap>();
cfg.CreateMap<CNM.PSApplicationGatewayProbe, MNM.ApplicationGatewayProbe>();
cfg.CreateMap<CNM.PSApplicationGatewayProbeHealthResponseMatch, MNM.ApplicationGatewayProbeHealthResponseMatch>();
cfg.CreateMap<CNM.PSApplicationGatewayProbe, MNM.ApplicationGatewayProbe>();
cfg.CreateMap<CNM.PSApplicationGatewayBackendAddress, MNM.ApplicationGatewayBackendAddress>();
cfg.CreateMap<CNM.PSApplicationGatewayBackendAddressPool, MNM.ApplicationGatewayBackendAddressPool>();
cfg.CreateMap<CNM.PSApplicationGatewayBackendHttpSettings, MNM.ApplicationGatewayBackendHttpSettings>();
cfg.CreateMap<CNM.PSApplicationGatewayFrontendIPConfiguration, MNM.ApplicationGatewayFrontendIPConfiguration>();
cfg.CreateMap<CNM.PSApplicationGatewayFrontendPort, MNM.ApplicationGatewayFrontendPort>();
cfg.CreateMap<CNM.PSApplicationGatewaySslCertificate, MNM.ApplicationGatewaySslCertificate>();
cfg.CreateMap<CNM.PSApplicationGatewayHttpListener, MNM.ApplicationGatewayHttpListener>();
cfg.CreateMap<CNM.PSApplicationGatewayIPConfiguration, MNM.ApplicationGatewayIPConfiguration>();
cfg.CreateMap<CNM.PSApplicationGatewayRequestRoutingRule, MNM.ApplicationGatewayRequestRoutingRule>();
cfg.CreateMap<CNM.PSApplicationGatewayRedirectConfiguration, MNM.ApplicationGatewayRedirectConfiguration>();
cfg.CreateMap<CNM.PSApplicationGatewaySslCertificate, MNM.ApplicationGatewaySslCertificate>();
cfg.CreateMap<CNM.PSApplicationGatewayAuthenticationCertificate, MNM.ApplicationGatewayAuthenticationCertificate>();
cfg.CreateMap<CNM.PSBackendAddressPool, MNM.BackendAddressPool>();
cfg.CreateMap<CNM.PSApplicationGatewayBackendHealth, MNM.ApplicationGatewayBackendHealth>();
Expand Down Expand Up @@ -435,18 +435,18 @@ public static void Initialize()
});
cfg.CreateMap<MNM.ApplicationGatewayPathRule, CNM.PSApplicationGatewayPathRule>();
cfg.CreateMap<MNM.ApplicationGatewayUrlPathMap, CNM.PSApplicationGatewayUrlPathMap>();
cfg.CreateMap<MNM.ApplicationGatewayProbe, CNM.PSApplicationGatewayProbe>();
cfg.CreateMap<MNM.ApplicationGatewayProbeHealthResponseMatch, CNM.PSApplicationGatewayProbeHealthResponseMatch>();
cfg.CreateMap<MNM.ApplicationGatewayProbe, CNM.PSApplicationGatewayProbe>();
cfg.CreateMap<MNM.ApplicationGatewayBackendAddress, CNM.PSApplicationGatewayBackendAddress>();
cfg.CreateMap<MNM.ApplicationGatewayBackendAddressPool, CNM.PSApplicationGatewayBackendAddressPool>();
cfg.CreateMap<MNM.ApplicationGatewayBackendHttpSettings, CNM.PSApplicationGatewayBackendHttpSettings>();
cfg.CreateMap<MNM.ApplicationGatewayFrontendIPConfiguration, CNM.PSApplicationGatewayFrontendIPConfiguration>();
cfg.CreateMap<MNM.ApplicationGatewaySslCertificate, CNM.PSApplicationGatewaySslCertificate>();
cfg.CreateMap<MNM.ApplicationGatewayFrontendPort, CNM.PSApplicationGatewayFrontendPort>();
cfg.CreateMap<MNM.ApplicationGatewayHttpListener, CNM.PSApplicationGatewayHttpListener>();
cfg.CreateMap<MNM.ApplicationGatewayIPConfiguration, CNM.PSApplicationGatewayIPConfiguration>();
cfg.CreateMap<MNM.ApplicationGatewayRequestRoutingRule, CNM.PSApplicationGatewayRequestRoutingRule>();
cfg.CreateMap<MNM.ApplicationGatewayRedirectConfiguration, CNM.PSApplicationGatewayRedirectConfiguration>();
cfg.CreateMap<MNM.ApplicationGatewaySslCertificate, CNM.PSApplicationGatewaySslCertificate>();
cfg.CreateMap<MNM.ApplicationGatewayAuthenticationCertificate, CNM.PSApplicationGatewayAuthenticationCertificate>();
cfg.CreateMap<MNM.BackendAddressPool, CNM.PSBackendAddressPool>();
cfg.CreateMap<MNM.ApplicationGatewayBackendHealth, CNM.PSApplicationGatewayBackendHealth>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class PSApplicationGatewayBackendHttpSettings : PSChildResource
public int Port { get; set; }
public string Protocol { get; set; }
public string CookieBasedAffinity { get; set; }
public uint RequestTimeout { get; set; }
public int RequestTimeout { get; set; }
public PSApplicationGatewayConnectionDraining ConnectionDraining { get; set; }
public PSResourceId Probe { get; set; }
public List<PSResourceId> AuthenticationCertificates { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ namespace Microsoft.Azure.Commands.Network.Models
public class PSApplicationGatewayConnectionDraining
{
public bool Enabled { get; set; }
public uint DrainTimeoutInSec { get; set; }
public int DrainTimeoutInSec { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class PSApplicationGatewayHttpListener : PSChildResource
public string Protocol { get; set; }
public string HostName { get; set; }
public PSResourceId SslCertificate { get; set; }
public string RequireServerNameIndication { get; set; }
public bool RequireServerNameIndication { get; set; }
public string ProvisioningState { get; set; }
public string Type { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public class PSApplicationGatewayProbe : PSChildResource
public string Protocol { get; set; }
public string Host { get; set; }
public string Path { get; set; }
public uint Interval { get; set; }
public uint Timeout { get; set; }
public uint UnhealthyThreshold { get; set; }
public int? Interval { get; set; }
public int? Timeout { get; set; }
public int? UnhealthyThreshold { get; set; }
public bool? PickHostNameFromBackendHttpSettings { get; set; }
public uint? MinServers { get; set; }
public int? MinServers { get; set; }
public PSApplicationGatewayProbeHealthResponseMatch Match { get; set; }
public string ProvisioningState { get; set; }
public string Type { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class PSBGPPeerStatus
public int? Asn { get; set; }
public string ConnectedDuration { get; set; }
public string LocalAddress { get; set; }
public int? MessagesReceived { get; set; }
public long? MessagesReceived { get; set; }
public long? MessagesSent { get; set; }
public string Neighbor { get; set; }
public long? RoutesReceived { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ namespace Microsoft.Azure.Commands.Network.Models
{
public class PSConnectionResetSharedKey
{
public uint KeyLength { get; set; }
public int KeyLength { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public class PSIpFlowVerify
public string Direction { get; set; }
public string LocalIPAddress { get; set; }
public string LocalPort { get; set; }
public uint Protocol { get; set; }
public uint RemoteIPAddress { get; set; }
public uint RemotePort { get; set; }
public int Protocol { get; set; }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is not even being used... should be removed. will check with Irina and follow up

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the file can be removed

public int RemoteIPAddress { get; set; }
public int RemotePort { get; set; }
public string TargetNicResourceId { get; set; }
public string TargetResourceId { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public class PSTunnelConnectionHealth

public string ConnectionStatus { get; set; }

public ulong IngressBytesTransferred { get; set; }
public long? IngressBytesTransferred { get; set; }

public ulong EgressBytesTransferred { get; set; }
public long? EgressBytesTransferred { get; set; }

public string LastConnectionEstablishedUtcTime { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public class PSVirtualNetworkGatewayConnection : PSTopLevelResource

public string ConnectionStatus { get; set; }

public ulong EgressBytesTransferred { get; set; }
public long? EgressBytesTransferred { get; set; }

public ulong IngressBytesTransferred { get; set; }
public long? IngressBytesTransferred { get; set; }

public List<PSTunnelConnectionHealth> TunnelConnectionStatus { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
public partial class PSVirtualNetworkUsage
{
public string Id { get; set; }
public long CurrentValue { get; set; }
public long Limit { get; set; }
public double CurrentValue { get; set; }
public double Limit { get; set; }
public string Unit { get; set; }
public PSUsageName Name { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public override void Execute()
private string ResetVirtualNetworkGatewayConnectionSharedKey()
{
var vnetGatewayConnectionSharedKey = new PSConnectionResetSharedKey();
vnetGatewayConnectionSharedKey.KeyLength = KeyLength;
vnetGatewayConnectionSharedKey.KeyLength = (int)KeyLength;

// Map to the sdk object
var vnetGatewayConnectionSharedKeyModel = Mapper.Map<MNM.ConnectionResetSharedKey>(vnetGatewayConnectionSharedKey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Compute" version="16.0.0" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Network" version="11.0.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Network" version="11.1.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
Expand Down
Loading