use new policy-rule object

This commit is contained in:
Pascal Fischer 2023-05-30 19:09:16 +02:00
parent 22e81f493b
commit 6fd13f563e

View File

@ -200,13 +200,14 @@ func (w *Worker) generateProperties() properties {
routes = routes + len(account.Routes) routes = routes + len(account.Routes)
nameservers = nameservers + len(account.NameServerGroups) nameservers = nameservers + len(account.NameServerGroups)
for _, rule := range account.Rules { for _, policy := range account.Policies {
policyRule := rule.ToPolicyRule() for _, rule := range policy.Rules {
rulesProtocol[string(policyRule.Protocol)]++ rulesProtocol[string(rule.Protocol)]++
if policyRule.Bidirectional { if rule.Bidirectional {
rulesDirection["bidirectional"]++ rulesDirection["bidirectional"]++
} else { } else {
rulesDirection["oneway"]++ rulesDirection["oneway"]++
}
} }
} }