alkivi-sas / salt-pfsense

Collection of modules and states for managing pfsense using Salt
GNU Lesser General Public License v3.0
17 stars 8 forks source link

Adding NAT rule fails if <nat> tags do not exist in config.xml #1

Closed JacobSweeten closed 4 years ago

JacobSweeten commented 4 years ago

Temporary workaround: Create a NAT rule and delete it to automatically create the proper tags in the config file.

The exception occurs here: https://github.com/alkivi-sas/salt-pfsense/blob/0f2f9fc7705d65aa76c2cf096abf683e95c3b0c3/_modules/pfsense_nat_rule.py#L241-L242

It attempts to grab 'nat', but it doesn't exist in config.

Version information: pfsense 2.4.4-RELEASE-p3 Python 2.7.16 Salt minion 2018.3.1 (Oxygen) Salt master 3000.3

martintamare commented 4 years ago

Thanks for the review, it's now fixed 👍