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

govc: Add sso.lpp.get and sso.lpp.update commands #2976

Merged
merged 1 commit into from Nov 18, 2022

Conversation

abonat
Copy link

@abonat abonat commented Oct 21, 2022

Closes: #2975

Description

It extends govc functionality with GetLocalPasswordPolicy and UpdateLocalPasswordPolicy methods, which are already here.
The new sso.lpp.get and sso.lpp.update commands are available
Tools like Ansible can read the state before do any change.
The check mode in Ansible modules can work also.

Type of change

Please mark options that are relevant:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update
  • Build related change

How Has This Been Tested?

  • sso.lpp.get
Description: The Number Of The Beast
MinLength: 0
MaxLength: 1
MinAlphabeticCount: 0
MinUppercaseCount: 0
MinLowercaseCount: 0
MinNumericCount: 0
MinSpecialCharCount: 0
MaxIdenticalAdjacentCharacters: 1
ProhibitedPreviousPasswordsCount: 1
PasswordLifetimeDays: 666
  • sso.lpp.update
    govc sso.lpp.update -PasswordLifetimeDays 0 -Description "The Great Zeroing"
  • sso.lpp.get - json
    { "LocalPasswordPolicy": { "Description": "The Great Zeroing", "ProhibitedPreviousPasswordsCount": 1, "PasswordFormat": { "LengthRestriction": { "MinLength": 0, "MaxLength": 1 }, "AlphabeticRestriction": { "MinAlphabeticCount": 0, "MinUppercaseCount": 0, "MinLowercaseCount": 0 }, "MinNumericCount": 0, "MinSpecialCharCount": 0, "MaxIdenticalAdjacentCharacters": 1 }, "PasswordLifetimeDays": 0 } }

Checklist:

  • My code follows the CONTRIBUTION
    guidelines of
    this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Copy link
Member

@dougm dougm left a comment

Choose a reason for hiding this comment

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

Thanks @abonat , looks good, just a few minor suggestions

govc/sso/lpp/get.go Outdated Show resolved Hide resolved
govc/sso/lpp/get.go Outdated Show resolved Hide resolved
Copy link
Member

@dougm dougm left a comment

Choose a reason for hiding this comment

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

Thanks @abonat

@dougm dougm merged commit 8f5c496 into vmware:master Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend govc functionality with Get(Update)LocalPasswordPolicy methods
2 participants