Skip to content

Commit

Permalink
work on PaloAltoNetworks#92 - surface delete errors in nat rules
Browse files Browse the repository at this point in the history
  • Loading branch information
shinmog committed Sep 22, 2022
1 parent 429d7e3 commit 789ca02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion poli/nat/fw.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ func (c *Firewall) ConfigureRules(vsys string, rules []Entry, auditComments map[
}

if len(rmList) != 0 {
_ = c.Delete(vsys, rmList...)
if err = c.Delete(vsys, rmList...); err != nil {
return err
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion poli/nat/pano.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ func (c *Panorama) ConfigureRules(dg, base string, rules []Entry, auditComments
}

if len(rmList) != 0 {
_ = c.Delete(dg, base, rmList...)
if err = c.Delete(dg, base, rmList...); err != nil {
return err
}
}
}

Expand Down

0 comments on commit 789ca02

Please sign in to comment.