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

add Panorama license check #111

Conversation

cdot65
Copy link
Owner

@cdot65 cdot65 commented Mar 16, 2024

Checklist for This Pull Request

🚨Please adhere to the guidelines for contributing to this repository.

  • Ensure you are submitting your pull request to a branch dedicated to a specific topic/feature/bugfix. Avoid using the master branch for pull requests.
  • Target your pull request to the main development branch in this repository.
  • Ensure your commit messages follow the project's preferred format.
  • Check that your code additions do not fail any linting checks or unit tests.

Pull Request Description

Implemented a check to validate that Panorama appliances are active in their licenses before upgrading. Our dependency of Upgrade Assurance package prevents us from running the readiness checks on Panorama appliances, so we have instead used the op method to perform request license info and perform validation on the response object.

The script will gracefully exit if there is no license info:

<response status="success">
    <result>
        <licenses></licenses>
    </result>
</response>

Or if the license entries are expired

<response status="success">
    <result>
        <licenses>
            <entry>
                <feature>Device Management License</feature>
                <description>VM Panorama license to manage up to 25 devices</description>
                <serial>0007EV12345</serial>
                <issued>February 03, 1999</issued>
                <expired>yes</expired>
                <authcode>I5012345</authcode>
            </entry>
            <entry>
                <feature>Premium</feature>
                <description>24 x 7 phone support; advanced replacement hardware service</description>
                <serial>0007EV48639</serial>
                <issued>February 03, 1999</issued>
                <expires>February 01, 2020</expires>
                <expired>yes</expired>
                <authcode>F2312345</authcode>
            </entry>
        </licenses>
    </result>
</response>

Otherwise the upgrade will continue.

What does this pull request accomplish?

  • Feature addition

Are there any breaking changes included?

  • Yes
  • No

Is there anything the reviewers should know?

Thank you for your contributions!

@cdot65 cdot65 added the enhancement New feature or request label Mar 16, 2024
@cdot65 cdot65 self-assigned this Mar 16, 2024
@cdot65 cdot65 linked an issue Mar 16, 2024 that may be closed by this pull request
@cdot65 cdot65 merged commit a3f933c into main Mar 16, 2024
1 check passed
@cdot65 cdot65 deleted the 110-pan-os-upgrade-panorama-licensing-checksoftware-download-check branch March 17, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pan-os-upgrade panorama Licensing Check/Software Download Check
1 participant