Add hpc yaml to detect missing LB_DSR rules in VFP#24
Add hpc yaml to detect missing LB_DSR rules in VFP#24codergem wants to merge 2 commits intomicrosoft:mainfrom
Conversation
|
@codergem please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
| foreach ($lbPolicy in $lbPolicies) { | ||
| $policyJson = ($lbPolicy | convertto-json -depth 10) | ||
|
|
||
| $policyInfo = $lbPolicy.Policies[0] |
There was a problem hiding this comment.
$policyInfo can only be nil only if $lbPolicy.Policies don't have any item present. In that case, will it not throw index out of bound kind of exception in powershell here.
| if ($policyInfo.VIPs[0] -eq $Ipv4Vip) { | ||
| if ($policyInfo.externalport -eq $ExternalPort) { | ||
| if ($policyInfo.protocol -eq $Protocol) { | ||
| $matchingLbId = $lbPolicy.Resources.Allocators.Id |
There was a problem hiding this comment.
Should it not be accessed like this: $policy.Resources.Allocators[0].Id since allocators is an array.
No description provided.