Skip to content

Commit 0c7265b

Browse files
johunteirrogozh
andauthored
Updated Connection monitor endpoint cmdlet (#13308)
Security-tools check passed. Force merge it because status cannot sync for the time being. * Updated Connection monitor endpoint cmdlet (#12943) * Updated ConnectionMonitorEndpoint cmdlet * Updated help files * Fixed help files * Suppressed breaking changes warnings * Fixed bug in New-AzConnectionMonitorEndpoint cmdlet. Updated help file (#13001) * Fixed bug in New-AzConnectionMonitorEndpoint cmdlet. Updated help file * Fixed typo and add online version in help file * Updated change log * fix changelog update Co-authored-by: irrogozh <[email protected]>
1 parent b392928 commit 0c7265b

18 files changed

+607
-308
lines changed

src/Network/Network/Az.Network.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ CmdletsToExport = 'Add-AzApplicationGatewayAuthenticationCertificate',
257257
'Test-AzNetworkWatcherConnectivity',
258258
'Get-AzNetworkWatcherReachabilityReport',
259259
'Get-AzNetworkWatcherReachabilityProvidersList',
260-
'New-AzNetworkWatcherConnectionMonitorEndpointFilterItemObject',
261-
'New-AzNetworkWatcherConnectionMonitorObject',
262260
'New-AzNetworkWatcherConnectionMonitorEndpointObject',
261+
'New-AzNetworkWatcherConnectionMonitorObject',
262+
'New-AzNetworkWatcherConnectionMonitorEndpointScopeItemObject',
263263
'New-AzNetworkWatcherConnectionMonitorTestConfigurationObject',
264264
'New-AzNetworkWatcherConnectionMonitorTestGroupObject',
265265
'New-AzNetworkWatcherConnectionMonitorOutputObject',

src/Network/Network/ChangeLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
- Added parameter `-SkuName` and made Sku as Alias for this
2929
- Removed parameter `-Sku`
3030
* [Breaking Change] Made `Connectionlink` argument mandatory in `Start-AzVpnConnectionPacketCapture` and `Stop-AzVpnConnectionPacketCapture`
31+
* [Breaking Change] Updated `New-AzNetworkWatcherConnectionMonitorEndPointObject` to remove parameter `-Filter`
32+
* [Breaking Change] Replaced `New-AzNetworkWatcherConnectionMonitorEndpointFilterItemObject` cmdlet with `New-AzNetworkWatcherConnectionMonitorEndpointScopeItemObject`
33+
* Updated `New-AzNetworkWatcherConnectionMonitorEndPointObject` cmdlet:
34+
- Added parameter `-Type`
35+
- Added parameter `-CoverageLevel`
36+
- Added parameter `-Scope`
37+
* Updated `New-AzNetworkWatcherConnectionMonitorProtocolConfigurationObject` cmdlet with new parameter `-DestinationPortBehavior`
3138

3239
## Version 3.5.0
3340
* Added Office365 Policy to VPNSite Resource

src/Network/Network/Common/NetworkResourceManagerProfile.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,8 @@ private static void Initialize()
556556
cfg.CreateMap<CNM.PSConnectionMonitorQueryResult, MNM.ConnectionMonitorQueryResult>();
557557
cfg.CreateMap<CNM.PSConnectionStateSnapshot, MNM.ConnectionStateSnapshot>();
558558
cfg.CreateMap<CNM.PSNetworkWatcherConnectionMonitorEndpointObject, MNM.ConnectionMonitorEndpoint>();
559-
cfg.CreateMap<CNM.PSNetworkWatcherConnectionMonitorEndpointFilter, MNM.ConnectionMonitorEndpointFilter>();
560-
cfg.CreateMap<CNM.PSNetworkWatcherConnectionMonitorEndpointFilterItem, MNM.ConnectionMonitorEndpointFilterItem>();
559+
cfg.CreateMap<CNM.PSNetworkWatcherConnectionMonitorEndpointScope, MNM.ConnectionMonitorEndpointScope>();
560+
cfg.CreateMap<CNM.PSNetworkWatcherConnectionMonitorEndpointScopeItem, MNM.ConnectionMonitorEndpointScopeItem>();
561561
cfg.CreateMap<CNM.PSNetworkWatcherConnectionMonitorTestConfigurationObject, MNM.ConnectionMonitorTestConfiguration>();
562562
cfg.CreateMap<CNM.PSNetworkWatcherConnectionMonitorTcpConfiguration, MNM.ConnectionMonitorTcpConfiguration>();
563563
cfg.CreateMap<CNM.PSNetworkWatcherConnectionMonitorIcmpConfiguration, MNM.ConnectionMonitorIcmpConfiguration>();
@@ -575,8 +575,8 @@ private static void Initialize()
575575
cfg.CreateMap<MNM.ConnectionMonitorQueryResult, CNM.PSConnectionMonitorQueryResult>();
576576
cfg.CreateMap<MNM.ConnectionStateSnapshot, CNM.PSConnectionStateSnapshot>();
577577
cfg.CreateMap<MNM.ConnectionMonitorEndpoint, CNM.PSNetworkWatcherConnectionMonitorEndpointObject>();
578-
cfg.CreateMap<MNM.ConnectionMonitorEndpointFilter, CNM.PSNetworkWatcherConnectionMonitorEndpointFilter>();
579-
cfg.CreateMap<MNM.ConnectionMonitorEndpointFilterItem, CNM.PSNetworkWatcherConnectionMonitorEndpointFilterItem>();
578+
cfg.CreateMap<MNM.ConnectionMonitorEndpointScope, CNM.PSNetworkWatcherConnectionMonitorEndpointScope>();
579+
cfg.CreateMap<MNM.ConnectionMonitorEndpointScopeItem, CNM.PSNetworkWatcherConnectionMonitorEndpointScopeItem>();
580580
cfg.CreateMap<MNM.ConnectionMonitorTestConfiguration, CNM.PSNetworkWatcherConnectionMonitorTestConfigurationObject>();
581581
cfg.CreateMap<MNM.ConnectionMonitorTcpConfiguration, CNM.PSNetworkWatcherConnectionMonitorTcpConfiguration>();
582582
cfg.CreateMap<MNM.ConnectionMonitorIcmpConfiguration, CNM.PSNetworkWatcherConnectionMonitorIcmpConfiguration>();

src/Network/Network/Models/PSConnectionMonitorEndPoint.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,25 @@ public class PSNetworkWatcherConnectionMonitorEndpointObject
2323
[Ps1Xml(Target = ViewControl.Table)]
2424
public string Name { get; set; }
2525

26+
[Ps1Xml(Target = ViewControl.Table)]
27+
public string Type { get; set; }
28+
2629
[Ps1Xml(Target = ViewControl.Table)]
2730
public string ResourceId { get; set; }
2831

2932
[Ps1Xml(Target = ViewControl.Table)]
3033
public string Address { get; set; }
3134

3235
[Ps1Xml(Target = ViewControl.Table)]
33-
public PSNetworkWatcherConnectionMonitorEndpointFilter Filter { get; set; }
36+
public PSNetworkWatcherConnectionMonitorEndpointScope Scope { get; set; }
37+
38+
[Ps1Xml(Target = ViewControl.Table)]
39+
public string CoverageLevel { get; set; }
3440

3541
[JsonIgnore]
36-
public string FilterText
42+
public string ScopeText
3743
{
38-
get { return JsonConvert.SerializeObject(this.Filter, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); }
44+
get { return JsonConvert.SerializeObject(this.Scope, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); }
3945
}
4046
}
4147
}

src/Network/Network/Models/PSConnectionMonitorEndpointFilter.cs renamed to src/Network/Network/Models/PSConnectionMonitorEndpointScope.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//
1+
//
22
// Copyright (c) Microsoft. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,17 +19,24 @@ namespace Microsoft.Azure.Commands.Network.Models
1919

2020
using System.Collections.Generic;
2121

22-
public class PSNetworkWatcherConnectionMonitorEndpointFilter
22+
public class PSNetworkWatcherConnectionMonitorEndpointScope
2323
{
24-
public string Type { get; set; }
24+
[Ps1Xml(Target = ViewControl.List)]
25+
public List<PSNetworkWatcherConnectionMonitorEndpointScopeItem> Include { get; set; }
2526

2627
[Ps1Xml(Target = ViewControl.List)]
27-
public List<PSNetworkWatcherConnectionMonitorEndpointFilterItem> Items { get; set; }
28+
public List<PSNetworkWatcherConnectionMonitorEndpointScopeItem> Exclude { get; set; }
29+
30+
[JsonIgnore]
31+
public string IncludeText
32+
{
33+
get { return JsonConvert.SerializeObject(this.Include, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); }
34+
}
2835

2936
[JsonIgnore]
30-
public string ItemsText
37+
public string ExcludeText
3138
{
32-
get { return JsonConvert.SerializeObject(this.Items, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); }
39+
get { return JsonConvert.SerializeObject(this.Exclude, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); }
3340
}
3441
}
3542
}

src/Network/Network/Models/PSConnectionMonitorEndpointFilterItem.cs renamed to src/Network/Network/Models/PSConnectionMonitorEndpointScopeItem.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//
1+
//
22
// Copyright (c) Microsoft. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,17 +14,11 @@
1414
//
1515

1616
using Microsoft.WindowsAzure.Commands.Common.Attributes;
17-
using Newtonsoft.Json;
18-
using System;
19-
using System.Collections.Generic;
2017

2118
namespace Microsoft.Azure.Commands.Network.Models
2219
{
23-
public class PSNetworkWatcherConnectionMonitorEndpointFilterItem
20+
public class PSNetworkWatcherConnectionMonitorEndpointScopeItem
2421
{
25-
[Ps1Xml(Target = ViewControl.Table)]
26-
public string Type { get; set; }
27-
2822
[Ps1Xml(Target = ViewControl.Table)]
2923
public string Address { get; set; }
3024
}

src/Network/Network/Models/PSConnectionMonitorTcpConfiguration.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ public class PSNetworkWatcherConnectionMonitorTcpConfiguration : PSNetworkWatche
1010

1111
[Ps1Xml(Target = ViewControl.Table)]
1212
public bool? DisableTraceRoute { get; set; }
13+
14+
[Ps1Xml(Target = ViewControl.Table)]
15+
public string DestinationPortBehavior { get; set; }
1316
}
1417
}

src/Network/Network/Network.format.ps1xml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,10 @@
333333
<Label>Name</Label>
334334
<PropertyName>Name</PropertyName>
335335
</ListItem>
336+
<ListItem>
337+
<Label>Type</Label>
338+
<PropertyName>Type</PropertyName>
339+
</ListItem>
336340
<ListItem>
337341
<Label>ResourceId</Label>
338342
<PropertyName>ResourceId</PropertyName>
@@ -342,49 +346,49 @@
342346
<PropertyName>Address</PropertyName>
343347
</ListItem>
344348
<ListItem>
345-
<Label>Filter</Label>
346-
<PropertyName>FilterText</PropertyName>
349+
<Label>Scope</Label>
350+
<PropertyName>ScopeText</PropertyName>
351+
</ListItem>
352+
<ListItem>
353+
<Label>CoverageLevel</Label>
354+
<PropertyName>CoverageLevel</PropertyName>
347355
</ListItem>
348356
</ListItems>
349357
</ListEntry>
350358
</ListEntries>
351359
</ListControl>
352360
</View>
353361
<View>
354-
<Name>Microsoft.Azure.Commands.Network.Models.PSNetworkWatcherConnectionMonitorEndpointFilter</Name>
362+
<Name>Microsoft.Azure.Commands.Network.Models.PSNetworkWatcherConnectionMonitorEndpointScope</Name>
355363
<ViewSelectedBy>
356-
<TypeName>Microsoft.Azure.Commands.Network.Models.PSNetworkWatcherConnectionMonitorEndpointFilter</TypeName>
364+
<TypeName>Microsoft.Azure.Commands.Network.Models.PSNetworkWatcherConnectionMonitorEndpointScope</TypeName>
357365
</ViewSelectedBy>
358366
<ListControl>
359367
<ListEntries>
360368
<ListEntry>
361369
<ListItems>
362370
<ListItem>
363-
<Label>Type</Label>
364-
<PropertyName>Type</PropertyName>
371+
<Label>Include</Label>
372+
<PropertyName>IncludeText</PropertyName>
365373
</ListItem>
366374
<ListItem>
367-
<Label>Items</Label>
368-
<PropertyName>ItemsText</PropertyName>
375+
<Label>Exclude</Label>
376+
<PropertyName>ExcludeText</PropertyName>
369377
</ListItem>
370378
</ListItems>
371379
</ListEntry>
372380
</ListEntries>
373381
</ListControl>
374382
</View>
375383
<View>
376-
<Name>Microsoft.Azure.Commands.Network.Models.PSNetworkWatcherConnectionMonitorEndpointFilterItem</Name>
384+
<Name>Microsoft.Azure.Commands.Network.Models.PSNetworkWatcherConnectionMonitorEndpointScopeItem</Name>
377385
<ViewSelectedBy>
378-
<TypeName>Microsoft.Azure.Commands.Network.Models.PSNetworkWatcherConnectionMonitorEndpointFilterItem</TypeName>
386+
<TypeName>Microsoft.Azure.Commands.Network.Models.PSNetworkWatcherConnectionMonitorEndpointScoperItem</TypeName>
379387
</ViewSelectedBy>
380388
<ListControl>
381389
<ListEntries>
382390
<ListEntry>
383391
<ListItems>
384-
<ListItem>
385-
<Label>Type</Label>
386-
<PropertyName>Type</PropertyName>
387-
</ListItem>
388392
<ListItem>
389393
<Label>Address</Label>
390394
<PropertyName>Address</PropertyName>
@@ -493,6 +497,10 @@
493497
<Label>DisableTraceRoute</Label>
494498
<PropertyName>DisableTraceRoute</PropertyName>
495499
</ListItem>
500+
<ListItem>
501+
<Label>DestinationPortBehavior</Label>
502+
<PropertyName>DestinationPortBehavior</PropertyName>
503+
</ListItem>
496504
</ListItems>
497505
</ListEntry>
498506
</ListEntries>

0 commit comments

Comments
 (0)