From e31e7514ce165a33822d0a053d78c64706ee68b5 Mon Sep 17 00:00:00 2001 From: Chris Marget Date: Wed, 10 Jan 2024 16:33:56 -0500 Subject: [PATCH] remove dead comments; readability --- apstra/two_stage_l3_clos_policy_rules.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/apstra/two_stage_l3_clos_policy_rules.go b/apstra/two_stage_l3_clos_policy_rules.go index af42ab8e..1711f42b 100644 --- a/apstra/two_stage_l3_clos_policy_rules.go +++ b/apstra/two_stage_l3_clos_policy_rules.go @@ -16,16 +16,6 @@ const ( portRangesSep = "," ) -// RULE_SCHEMA = { -// 'id': s.Optional(s.NodeId(description='ID of the rule node')), -// 'label': s.GenericName(description='Unique user-friendly name of the rule'), -// 'protocol': s.SecurityRuleProtocol(), -// 'src_port': s.PortSetOrAny(), -// 'dst_port': s.PortSetOrAny(), -// 'description': s.Optional(s.Description(), load_default=''), -// 'action': s.SecurityRuleAction() // ['deny', 'deny_log', 'permit', 'permit_log'], -//} - type PolicyRuleAction enum.Member[string] var ( @@ -146,14 +136,17 @@ func (o rawPolicyRule) polish() (*PolicyRule, error) { if action == nil { return nil, fmt.Errorf("unknown policy rule action %q", o.Action) } + srcPort, err := o.SrcPort.parse() if err != nil { return nil, err } + dstPort, err := o.DstPort.parse() if err != nil { return nil, err } + return &PolicyRule{ Id: o.Id, Label: o.Label,