Skip to content
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

EXO-Policies: Changed $PSBoundParameters to [System.Collections.Hashtable] for resources where it was needed #1163

Merged
merged 5 commits into from
Apr 19, 2021

Conversation

RuudGijsbers
Copy link
Contributor

@RuudGijsbers RuudGijsbers commented Apr 18, 2021

EXO-Policies.

I've added [System.Collections.Hashtable] to the declaration of the $PSBoundParameters in the Set-TargetResource part of these resources.

I've also added the removal of some key-value pairs:
$InboundConnectorParams.Remove('ApplicationId') | Out-Null $InboundConnectorParams.Remove('TenantId') | Out-Null $InboundConnectorParams.Remove('CertificateThumbprint') | Out-Null $InboundConnectorParams.Remove('CertificatePath') | Out-Null $InboundConnectorParams.Remove('CertificatePassword') | Out-Null

And lastly I also remove the same parameters from the Test-TargetResource section:
$ValuesToCheck = $PSBoundParameters $ValuesToCheck.Remove('GlobalAdminAccount') | Out-Null $ValuesToCheck.Remove('ApplicationId') | Out-Null $ValuesToCheck.Remove('TenantId') | Out-Null $ValuesToCheck.Remove('CertificateThumbprint') | Out-Null $ValuesToCheck.Remove('CertificatePath') | Out-Null $ValuesToCheck.Remove('CertificatePassword') | Out-Null

I've checked all EXO Resources for these configurations and changed where needed and tested it.


This change is Reviewable

At the Test-TargetResource I've added:
    $ValuesToCheck.Remove('ApplicationId') | Out-Null
    $ValuesToCheck.Remove('TenantId') | Out-Null
    $ValuesToCheck.Remove('CertificateThumbprint') | Out-Null
    $ValuesToCheck.Remove('CertificatePath') | Out-Null
    $ValuesToCheck.Remove('CertificatePassword') | Out-Null

So these values will not be checked during Test-TargetResource
EXO Resources: Removed elements from hashtable
@ghost
Copy link

ghost commented Apr 18, 2021

CLA assistant check
All CLA requirements met.

Copy link
Collaborator

@NikCharlebois NikCharlebois left a comment

Choose a reason for hiding this comment

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

:lgtm:

Thanks a lot for the Pull Request. Great work!

Reviewed 40 of 40 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @RuudGijsbers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment