Skip to content

Commit

Permalink
remove dead comments; readability
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismarget-j committed Jan 10, 2024
1 parent 7e36f76 commit e31e751
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions apstra/two_stage_l3_clos_policy_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e31e751

Please sign in to comment.