Skip to content

Commit bf6e734

Browse files
p-thompsonsssharma24Nickcandy
authored
New cmdlets for IPAM, VnV, Vnet, and AVNM SA (#26345)
* new cmdlets * Help docs for IPAM cmdlets Update New-AzNetworkManagerIpamPoolStaticCidr.md Update Set-AzNetworkManagerIpamPool.md Update Remove-AzNetworkManagerIpamPoolStaticCidr.md Update Remove-AzNetworkManagerIpamPool.md Update New-AzNetworkManagerIpamPoolStaticCidr.md Update New-AzNetworkManagerIpamPool.md Update Get-AzNetworkManagerIpamPoolUsage.md Update Get-AzNetworkManagerIpamPoolStaticCidr.md Update Get-AzNetworkManagerIpamPool.md Update Get-AzNetworkManagerIpamPoolUsage.md Update Get-AzNetworkManagerIpamPool.md update set ipam pool cmdlet help doc updated help docs for new IPAM commands update help docs for ipam remove cmdlets update help docs for new Get cmdlets fix new ipam pool static cidr requirement * cmdlets for vnv * adding UTs * nomenclature fix * debug * mapping fix and inital help docs * update some help docs * NetworkManagerVerifierWorkspaceCRUD test * add location * update run crud * Security admin config changes * security rule update * updating change log * update for SA command * Reachability Analysis Run Test * all vnv tests working * NetworkManagerVerifierWorkspaceCRUD test * update run crud * Security admin config changes * security rule update * updating change log * update for SA command * Reachability Analysis Run Test * all vnv tests working * Help Doc Update nomenclature fix mapping fix and inital help docs add location remaining help docs fix change log fix changelog pt 2 debug update some help docs * all SA and network manager tests running * new commit to jumpstart the pipeline * build issues * add help doc online version links * fix help doc header * fix psd1 file * updated scenario test for analysis result * help doc fixes * fixes for analyze plural param bug * fix analyze example issue * fix generated sdk bug * add related links * param rename for analyze job * rerun build * adding tag testing * help doc update * added list test coverage and combined all vnv crud into one run crud * add and test tags for vnv * update test file * debug * fix az * add help documentation * checking analysis result obj and added SA aggre prop to help doc * adding all read only properties for run * trying to get check running * regenerated sdk and updated az.network --------- Co-authored-by: Sonalli S Sharma <[email protected]> Co-authored-by: sssharma24 <[email protected]> Co-authored-by: NanxiangLiu <[email protected]>
1 parent fae92de commit bf6e734

File tree

612 files changed

+37468
-3705
lines changed

Some content is hidden

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

612 files changed

+37468
-3705
lines changed

src/Network/Network.Management.Sdk/Generated/AdminRuleCollectionsOperations.cs

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
102102
{
103103
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkManagerName");
104104
}
105-
105+
if (networkManagerName != null)
106+
{
107+
if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$"))
108+
{
109+
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$");
110+
}
111+
}
106112
if (configurationName == null)
107113
{
108114
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "configurationName");
@@ -120,7 +126,7 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
120126
}
121127
}
122128

123-
string apiVersion = "2024-03-01";
129+
string apiVersion = "2024-05-01";
124130
// Tracing
125131
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
126132
string _invocationId = null;
@@ -221,14 +227,13 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
221227

222228
if ((int)_statusCode != 200)
223229
{
224-
var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
230+
var ex = new CommonErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
225231
try
226232
{
227233
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
228-
CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, this.Client.DeserializationSettings);
234+
CommonErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CommonErrorResponse>(_responseContent, this.Client.DeserializationSettings);
229235
if (_errorBody != null)
230236
{
231-
ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
232237
ex.Body = _errorBody;
233238
}
234239
}
@@ -238,10 +243,6 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
238243
}
239244
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
240245
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
241-
if (_httpResponse.Headers.Contains("x-ms-request-id"))
242-
{
243-
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
244-
}
245246
if (_shouldTrace)
246247
{
247248
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -347,7 +348,13 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
347348
{
348349
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkManagerName");
349350
}
350-
351+
if (networkManagerName != null)
352+
{
353+
if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$"))
354+
{
355+
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$");
356+
}
357+
}
351358
if (configurationName == null)
352359
{
353360
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "configurationName");
@@ -358,7 +365,7 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
358365
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ruleCollectionName");
359366
}
360367

361-
string apiVersion = "2024-03-01";
368+
string apiVersion = "2024-05-01";
362369
// Tracing
363370
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
364371
string _invocationId = null;
@@ -451,14 +458,13 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
451458

452459
if ((int)_statusCode != 200)
453460
{
454-
var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
461+
var ex = new CommonErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
455462
try
456463
{
457464
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
458-
CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, this.Client.DeserializationSettings);
465+
CommonErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CommonErrorResponse>(_responseContent, this.Client.DeserializationSettings);
459466
if (_errorBody != null)
460467
{
461-
ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
462468
ex.Body = _errorBody;
463469
}
464470
}
@@ -468,10 +474,6 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
468474
}
469475
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
470476
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
471-
if (_httpResponse.Headers.Contains("x-ms-request-id"))
472-
{
473-
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
474-
}
475477
if (_shouldTrace)
476478
{
477479
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -585,7 +587,13 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
585587
{
586588
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkManagerName");
587589
}
588-
590+
if (networkManagerName != null)
591+
{
592+
if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$"))
593+
{
594+
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$");
595+
}
596+
}
589597
if (configurationName == null)
590598
{
591599
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "configurationName");
@@ -596,7 +604,7 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
596604
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ruleCollectionName");
597605
}
598606

599-
string apiVersion = "2024-03-01";
607+
string apiVersion = "2024-05-01";
600608
// Tracing
601609
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
602610
string _invocationId = null;
@@ -696,14 +704,13 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
696704

697705
if ((int)_statusCode != 200 && (int)_statusCode != 201)
698706
{
699-
var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
707+
var ex = new CommonErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
700708
try
701709
{
702710
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
703-
CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, this.Client.DeserializationSettings);
711+
CommonErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CommonErrorResponse>(_responseContent, this.Client.DeserializationSettings);
704712
if (_errorBody != null)
705713
{
706-
ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
707714
ex.Body = _errorBody;
708715
}
709716
}
@@ -713,10 +720,6 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
713720
}
714721
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
715722
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
716-
if (_httpResponse.Headers.Contains("x-ms-request-id"))
717-
{
718-
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
719-
}
720723
if (_shouldTrace)
721724
{
722725
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -875,7 +878,13 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
875878
{
876879
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkManagerName");
877880
}
878-
881+
if (networkManagerName != null)
882+
{
883+
if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$"))
884+
{
885+
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$");
886+
}
887+
}
879888
if (configurationName == null)
880889
{
881890
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "configurationName");
@@ -887,7 +896,7 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
887896
}
888897

889898

890-
string apiVersion = "2024-03-01";
899+
string apiVersion = "2024-05-01";
891900
// Tracing
892901
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
893902
string _invocationId = null;
@@ -985,14 +994,13 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
985994

986995
if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
987996
{
988-
var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
997+
var ex = new CommonErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
989998
try
990999
{
9911000
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
992-
CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, this.Client.DeserializationSettings);
1001+
CommonErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CommonErrorResponse>(_responseContent, this.Client.DeserializationSettings);
9931002
if (_errorBody != null)
9941003
{
995-
ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
9961004
ex.Body = _errorBody;
9971005
}
9981006
}
@@ -1002,10 +1010,6 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
10021010
}
10031011
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
10041012
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
1005-
if (_httpResponse.Headers.Contains("x-ms-request-id"))
1006-
{
1007-
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
1008-
}
10091013
if (_shouldTrace)
10101014
{
10111015
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -1163,14 +1167,13 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
11631167

11641168
if ((int)_statusCode != 200)
11651169
{
1166-
var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
1170+
var ex = new CommonErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
11671171
try
11681172
{
11691173
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
1170-
CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, this.Client.DeserializationSettings);
1174+
CommonErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<CommonErrorResponse>(_responseContent, this.Client.DeserializationSettings);
11711175
if (_errorBody != null)
11721176
{
1173-
ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
11741177
ex.Body = _errorBody;
11751178
}
11761179
}
@@ -1180,10 +1183,6 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client)
11801183
}
11811184
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
11821185
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
1183-
if (_httpResponse.Headers.Contains("x-ms-request-id"))
1184-
{
1185-
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
1186-
}
11871186
if (_shouldTrace)
11881187
{
11891188
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);

0 commit comments

Comments
 (0)