Skip to content

Commit fb314ad

Browse files
authored
Merge pull request #6117 from junyezhu/juliet/feat/addprotocolconfig
Juliet/feat/addprotocolconfig
2 parents 5667520 + f6468bb commit fb314ad

File tree

60 files changed

+2153
-287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2153
-287
lines changed

src/ResourceManager/Network/AzureRM.Network.psd1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ CmdletsToExport = 'Add-AzureRmApplicationGatewayAuthenticationCertificate',
320320
'New-AzureRmDdosProtectionPlan',
321321
'Get-AzureRmDdosProtectionPlan',
322322
'Remove-AzureRmDdosProtectionPlan',
323+
'New-AzureRMNetworkWatcherProtocolConfiguration',
323324
'Add-AzureRmExpressRouteCircuitConnectionConfig',
324325
'Get-AzureRmExpressRouteCircuitConnectionConfig',
325326
'Remove-AzureRmExpressRouteCircuitConnectionConfig'

src/ResourceManager/Network/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
## Current Release
2222

2323
* Bump up Network SDK version from 18.0.0-preview to 19.0.0-preview
24+
* Added cmdlet to create protocol configuration
25+
- New-AzureRmNetworkWatcherProtocolConfiguration
2426

2527
## Version 6.0.0
2628
* Added cmdlet to add a new circuit connection to an existing express route circuit.

src/ResourceManager/Network/Commands.Network/Commands.Network.csproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@
227227
<Compile Include="Models\PSConnectionMonitorSource.cs" />
228228
<Compile Include="Models\PSConnectionStateSnapshot.cs" />
229229
<Compile Include="Models\PSEndpointServiceResult.cs" />
230+
<Compile Include="Models\PSNetworkWatcherProtocolConfiguration.cs" />
230231
<Compile Include="Models\PSServiceEndpoint.cs" />
231232
<Compile Include="Models\PSLoadBalancerSku.cs" />
232233
<Compile Include="Models\PSPublicIpAddressSku.cs" />
@@ -319,9 +320,9 @@
319320
<Compile Include="Models\PSSubnet.cs" />
320321
<Compile Include="Models\PSSubnetAssociation.cs" />
321322
<Compile Include="Models\PSTopLevelResource.cs" />
322-
<Compile Include="Models\PSTroubleshootDetails.cs" />
323-
<Compile Include="Models\PSTroubleshootRecommendedActions.cs" />
324-
<Compile Include="Models\PSTroubleshootResult.cs" />
323+
<Compile Include="Models\PSTroubleshootingDetails.cs" />
324+
<Compile Include="Models\PSTroubleshootingRecommendedActions.cs" />
325+
<Compile Include="Models\PSTroubleshootingResult.cs" />
325326
<Compile Include="Models\PSUsage.cs" />
326327
<Compile Include="Models\PSUsageCustom.cs" />
327328
<Compile Include="Models\PSUsageName.cs" />
@@ -371,6 +372,7 @@
371372
<Compile Include="NetworkWatcher\ConnectionMonitor\SetAzureNetworkWatcherConnectionMonitorCommand.cs" />
372373
<Compile Include="NetworkWatcher\ConnectionMonitor\StartAzureNetworkWatcherConnectionMonitorCommand.cs" />
373374
<Compile Include="NetworkWatcher\ConnectionMonitor\StopAzureNetworkWatcherConnectionMonitorCommand.cs" />
375+
<Compile Include="NetworkWatcher\NewAzureNetworkWatcherProtocolConfiguration.cs" />
374376
<Compile Include="NetworkWatcher\TestAzureNetworkWatcherConnectivityCommand.cs" />
375377
<Compile Include="ProviderWideCmdlets\GetAzureBgpServiceCommunityCommand.cs" />
376378
<Compile Include="NetworkWatcher\GetAzureNetworkWatcherCommand.cs" />

src/ResourceManager/Network/Commands.Network/Common/NetworkResourceManagerProfile.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,14 @@ private static void Initialize()
209209

210210
// Troubleshoot
211211
// CNM to MNM
212-
cfg.CreateMap<CNM.PSTroubleshootResult, MNM.TroubleshootingResult>();
213-
cfg.CreateMap<CNM.PSTroubleshootDetails, MNM.TroubleshootingDetails>();
214-
cfg.CreateMap<CNM.PSTroubleshootRecommendedActions, MNM.TroubleshootingRecommendedActions>();
212+
cfg.CreateMap<CNM.PSTroubleshootingResult, MNM.TroubleshootingResult>();
213+
cfg.CreateMap<CNM.PSTroubleshootingDetails, MNM.TroubleshootingDetails>();
214+
cfg.CreateMap<CNM.PSTroubleshootingRecommendedActions, MNM.TroubleshootingRecommendedActions>();
215215

216216
// MNM to CNM
217-
cfg.CreateMap<MNM.TroubleshootingResult, CNM.PSTroubleshootResult>();
218-
cfg.CreateMap<MNM.TroubleshootingDetails, CNM.PSTroubleshootDetails>();
219-
cfg.CreateMap<MNM.TroubleshootingRecommendedActions, CNM.PSTroubleshootRecommendedActions>();
217+
cfg.CreateMap<MNM.TroubleshootingResult, CNM.PSTroubleshootingResult>();
218+
cfg.CreateMap<MNM.TroubleshootingDetails, CNM.PSTroubleshootingDetails>();
219+
cfg.CreateMap<MNM.TroubleshootingRecommendedActions, CNM.PSTroubleshootingRecommendedActions>();
220220

221221
// FlowLog
222222
// CNM to MNM
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Newtonsoft.Json;
16+
using System.Collections;
17+
18+
namespace Microsoft.Azure.Commands.Network.Models
19+
{
20+
public class PSNetworkWatcherProtocolConfiguration
21+
{
22+
[JsonProperty(Order = 2)]
23+
public string Protocol { get; set; }
24+
25+
[JsonProperty(Order = 2)]
26+
public string Method { get; set; }
27+
28+
[JsonProperty(Order = 2)]
29+
public IDictionary Header { get; set; }
30+
31+
[JsonProperty(Order = 2)]
32+
public int[] ValidStatusCode { get; set; }
33+
}
34+
}

src/ResourceManager/Network/Commands.Network/Models/PSTroubleshootDetails.cs renamed to src/ResourceManager/Network/Commands.Network/Models/PSTroubleshootingDetails.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ namespace Microsoft.Azure.Commands.Network.Models
1717
using Newtonsoft.Json;
1818
using System.Collections.Generic;
1919

20-
public class PSTroubleshootDetails
20+
public class PSTroubleshootingDetails
2121
{
2222
public string Detail { get; set; }
2323

2424
public string Id { get; set; }
2525

2626
public string ReasonType { get; set; }
2727

28-
public List<PSTroubleshootRecommendedActions> RecommendedActions { get; set; }
28+
public List<PSTroubleshootingRecommendedActions> RecommendedActions { get; set; }
2929

3030
public string Summary { get; set; }
3131

src/ResourceManager/Network/Commands.Network/Models/PSTroubleshootRecommendedActions.cs renamed to src/ResourceManager/Network/Commands.Network/Models/PSTroubleshootingRecommendedActions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
namespace Microsoft.Azure.Commands.Network.Models
1818
{
19-
public class PSTroubleshootRecommendedActions
19+
public class PSTroubleshootingRecommendedActions
2020
{
2121
public string ActionId { get; set; }
2222

src/ResourceManager/Network/Commands.Network/Models/PSTroubleshootResult.cs renamed to src/ResourceManager/Network/Commands.Network/Models/PSTroubleshootingResult.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ namespace Microsoft.Azure.Commands.Network.Models
1818
using System;
1919
using System.Collections.Generic;
2020

21-
public class PSTroubleshootResult : PSTopLevelResource
21+
public class PSTroubleshootingResult : PSTopLevelResource
2222
{
2323
public string Code { get; set; }
2424

2525
public DateTime? EndTime { get; set; }
2626

27-
public List<PSTroubleshootDetails> Results { get; set; }
27+
public List<PSTroubleshootingDetails> Results { get; set; }
2828

2929
public DateTime? StartTime { get; set; }
3030

src/ResourceManager/Network/Commands.Network/NetworkWatcher/ConnectionMonitor/NewAzureNetworkWatcherConnectionMonitorCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ private PSConnectionMonitorResult CreateConnectionMonitor(string resourceGroupNa
202202
}
203203
else if (ParameterSetName.Contains("SetByName"))
204204
{
205-
NetworkWatcher networkWatcher = this.NetworkClient.NetworkManagementClient.NetworkWatchers.Get(this.ResourceGroupName, this.NetworkWatcherName);
205+
MNM.NetworkWatcher networkWatcher = this.NetworkClient.NetworkManagementClient.NetworkWatchers.Get(this.ResourceGroupName, this.NetworkWatcherName);
206206
parameters.Location = networkWatcher.Location;
207207
}
208208
else

src/ResourceManager/Network/Commands.Network/NetworkWatcher/ConnectionMonitor/SetAzureNetworkWatcherConnectionMonitorCommand.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1818
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
1919
using Microsoft.Azure.Management.Network;
20-
using Microsoft.Azure.Management.Network.Models;
2120
using System;
2221
using System.Collections;
2322
using System.Collections.Generic;
@@ -243,7 +242,7 @@ private PSConnectionMonitorResult UpdateConnectionMonitor(string resourceGroupNa
243242
}
244243
else
245244
{
246-
NetworkWatcher networkWatcher = this.NetworkClient.NetworkManagementClient.NetworkWatchers.Get(resourceGroupName, networkWatcherName);
245+
MNM.NetworkWatcher networkWatcher = this.NetworkClient.NetworkManagementClient.NetworkWatchers.Get(resourceGroupName, networkWatcherName);
247246
parameters.Location = networkWatcher.Location;
248247
}
249248

0 commit comments

Comments
 (0)