Skip to content

Commit

Permalink
Merge pull request #92 from cdot65/91-enhancement-check-for-preempt-s…
Browse files Browse the repository at this point in the history
…etting-in-ha-configuration-before-upgrade

91 enhancement check for preempt setting in ha configuration before upgrade
  • Loading branch information
cdot65 authored Feb 17, 2024
2 parents 4621e49 + 84f96f2 commit c3b1f2d
Show file tree
Hide file tree
Showing 8 changed files with 172 additions and 78 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<br />
<div align="center">
<img src="https://github.com/cdot65/pan-os-upgrade/blob/main/docs/images/logo.svg?raw=true" alt="Logo">
<h3 align="center">PAN-OS Automation Project</h3>
<h3 align="center">PAN-OS and Panorama Upgrade Automation</h3>
<p align="center">
Streamlining Palo Alto Networks Firewall Upgrades with Python Automation
<br />
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ WORKDIR /app
ADD settings.yaml /app

# Install any needed packages specified in requirements.txt
# Note: The requirements.txt should contain pan-os-upgrade==1.2.5
RUN pip install --no-cache-dir pan-os-upgrade==1.2.5
# Note: The requirements.txt should contain pan-os-upgrade==1.2.6
RUN pip install --no-cache-dir pan-os-upgrade==1.2.6

# Set the locale to avoid issues with emoji rendering
ENV LANG C.UTF-8
Expand Down
8 changes: 4 additions & 4 deletions docs/about/contributing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to PAN-OS Automation Project
# Contributing to `pan-os-upgrade`

We're thrilled that you're interested in contributing to the PAN-OS Automation Project! Your contributions are essential for making this project better and more effective. Whether you're fixing a bug, adding a new feature, improving the documentation, or just giving suggestions, every contribution is valuable.
We're thrilled that you're interested in contributing to the `pan-os-upgrade` project! Your contributions are essential for making this project better and more effective. Whether you're fixing a bug, adding a new feature, improving the documentation, or just giving suggestions, every contribution is valuable.

---

Expand All @@ -10,7 +10,7 @@ Before you begin, make sure you have a GitHub account and are familiar with Git

### Setting Up Your Environment

1. **Fork the Repository:** Start by forking the [PAN-OS Automation Project repository](https://github.com/cdot65/pan-os-upgrade) on GitHub.
1. **Fork the Repository:** Start by forking the [pan-os-upgrade repository](https://github.com/cdot65/pan-os-upgrade) on GitHub.

2. **Clone Your Fork:** Clone your fork to your local machine:

Expand Down Expand Up @@ -51,7 +51,7 @@ Before you begin, make sure you have a GitHub account and are familiar with Git
git push origin feature/YourFeatureName
```
2. **Create a Pull Request:** Go to the original PAN-OS Automation Project repository on GitHub and create a new pull request. Provide a clear description of your changes and any relevant issue numbers.
2. **Create a Pull Request:** Go to the original `pan-os-upgrade` repository on GitHub and create a new pull request. Provide a clear description of your changes and any relevant issue numbers.
3. **Code Review:** Wait for a review from the project maintainers. Be open to feedback and make any requested changes.
Expand Down
10 changes: 10 additions & 0 deletions docs/about/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

Welcome to the release notes for the `pan-os-upgrade` tool. This document provides a detailed record of changes, enhancements, and fixes in each version of the tool.

## Version 1.2.6

**Release Date:** *<20240217>*

<!-- trunk-ignore(markdownlint/MD024) -->
### What's New

- Move HA status collection within the `get_firewall_details` function for batch upgrades.
- Update interactive inventory menu to include HA role of the firewall and if it has `preempt` enabled.

## Version 1.2.5

**Release Date:** *<20240215>*
Expand Down
214 changes: 149 additions & 65 deletions pan_os_upgrade/upgrade.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pan-os-upgrade"
version = "1.2.5"
version = "1.2.6"
description = "Python script to automate the upgrade process of PAN-OS firewalls."
authors = ["Calvin Remsburg <[email protected]>"]
documentation = "https://cdot65.github.io/pan-os-upgrade/"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_create_firewall_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pan_os_upgrade.upgrade import (
connect_to_host,
get_firewalls_from_panorama,
get_firewalls_info,
threaded_get_firewall_details,
create_firewall_mapping,
)
from panos.firewall import Firewall
Expand Down Expand Up @@ -79,7 +79,7 @@ def test_create_firewall_mapping_integration():
assert all_firewalls, "No firewalls retrieved from Panorama"

# Fetch detailed information for each firewall
firewalls_info = get_firewalls_info(all_firewalls)
firewalls_info = threaded_get_firewall_details(all_firewalls)

# Ensure that information is retrieved for each firewall
assert firewalls_info, "Failed to retrieve firewall information"
Expand Down
6 changes: 3 additions & 3 deletions tests/test_get_ha_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
("panorama.cdot.io", "disabled", None),
("panorama1.cdot.io", "primary-active", None),
("panorama2.cdot.io", "secondary-passive", None),
("houston.cdot.io", "disabled", None),
("woodlands-fw1.cdot.io", "active", None),
("woodlands-fw2.cdot.io", "passive", None),
("lab-fw1.cdot.io", "disabled", None),
("lab-fw6.cdot.io", "active", None),
("lab-fw7.cdot.io", "passive", None),
]


Expand Down

0 comments on commit c3b1f2d

Please sign in to comment.