panos_util/panorama.py
def _update_rule_counts(self) -> None:
        """Recalculates the rule stats for this DeviceGroup."""
        for rule in self.rules:
            self._rule_counts["total"] += 1

            if rule.disabled is False:
                self._rule_counts[rule.action] += 1

                vp = None
                if rule.vulnerability_profile is not None:
                    vp = self.resolve_profile(rule.vulnerability_profile)
                elif rule.security_profile_group is not None:
                    vp = self.resolve_profile_group(rule.security_profile_group)

                if vp is not None:
                    if vp.alert_only() is True:
                        self._rule_counts["alert_only"] += 1
                    else:
                        if vp.blocks_criticals() is True:
                            self._rule_counts["blocks_criticals"] += 1
                        if vp.blocks_high() is True:
                            self._rule_counts["blocks_high"] += 1
                        if vp.blocks_medium() is True:
                            self._rule_counts["blocks_medium"] += 1

            else:
                self._rule_counts["disabled"] += 1
Recalculates the rule stats for this DeviceGroup.
Recalculates the rule stats for this DeviceGroup.
Recalculates the rule stats for this DeviceGroup .
def _update_rule_counts(self) -> None:
        for rule in self.rules:
            self._rule_counts["total"] += 1
            if rule.disabled is False:
                self._rule_counts[rule.action] += 1
                vp = None
                if rule.vulnerability_profile is not None:
                    vp = self.resolve_profile(rule.vulnerability_profile)
                elif rule.security_profile_group is not None:
                    vp = self.resolve_profile_group(rule.security_profile_group)
                if vp is not None:
                    if vp.alert_only() is True:
                        self._rule_counts["alert_only"] += 1
                    else:
                        if vp.blocks_criticals() is True:
                            self._rule_counts["blocks_criticals"] += 1
                        if vp.blocks_high() is True:
                            self._rule_counts["blocks_high"] += 1
                        if vp.blocks_medium() is True:
                            self._rule_counts["blocks_medium"] += 1
            else:
                self._rule_counts["disabled"] += 1
def _update_rule_counts ( self ) -> None : for rule in self . rules : self . _rule_counts [ "total" ] += 1 if rule . disabled is False : self . _rule_counts [ rule . action ] += 1 vp = None if rule . vulnerability_profile is not None : vp = self . resolve_profile ( rule . vulnerability_profile ) elif rule . security_profile_group is not None : vp = self . resolve_profile_group ( rule . security_profile_group ) if vp is not None : if vp . alert_only ( ) is True : self . _rule_counts [ "alert_only" ] += 1 else : if vp . blocks_criticals ( ) is True : self . _rule_counts [ "blocks_criticals" ] += 1 if vp . blocks_high ( ) is True : self . _rule_counts [ "blocks_high" ] += 1 if vp . blocks_medium ( ) is True : self . _rule_counts [ "blocks_medium" ] += 1 else : self . _rule_counts [ "disabled" ] += 1
Recalculates the rule stats for this DeviceGroup.
Recalculates the rule stats for this DeviceGroup .
"""Recalculates the rule stats for this DeviceGroup."""
self