Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add uuid service support #117

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions errors/panos.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
stderr "errors"
"fmt"
"strings"

"github.com/PaloAltoNetworks/pango/util"
)

var InvalidFilterError = stderr.New("filter is improperly formatted")
Expand Down Expand Up @@ -67,8 +65,12 @@ type errorCheck struct {
}

type errorCheckMsg struct {
Line []util.CdataText `xml:"line"`
Message string `xml:",chardata"`
Line []errLine `xml:"line"`
Message string `xml:",chardata"`
}

type errLine struct {
Text string `xml:",cdata"`
}

func (e *errorCheck) Failed() bool {
Expand Down
6 changes: 3 additions & 3 deletions filtering/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
)

func Parse(s string, quote string) (*Group, error) {
if len(quote) != 1 {
if s == "" {
return nil, nil
} else if len(quote) != 1 {
return nil, fmt.Errorf("quote character should be one character")
} else if quote == "&" || quote == "|" || quote == "(" || quote == ")" || quote == " " || quote == `\` || quote == "!" || quote == "." || quote == "<" || quote == ">" || quote == "=" || quote == "-" || quote == "_" {
return nil, fmt.Errorf("quote character cannot be a reserved character")
} else if s == "" {
return nil, nil
}

var ch rune
Expand Down
10 changes: 5 additions & 5 deletions objects/address/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,27 +136,27 @@ func SpecMatches(a, b *Entry) bool {

// Don't compare Name.

if !util.OptionalStringsMatch(a.Description, b.Description) {
if !util.StringsMatch(a.Description, b.Description) {
return false
}

if !util.OrderedListsMatch(a.Tags, b.Tags) {
return false
}

if !util.OptionalStringsMatch(a.IpNetmask, b.IpNetmask) {
if !util.StringsMatch(a.IpNetmask, b.IpNetmask) {
return false
}

if !util.OptionalStringsMatch(a.IpRange, b.IpRange) {
if !util.StringsMatch(a.IpRange, b.IpRange) {
return false
}

if !util.OptionalStringsMatch(a.Fqdn, b.Fqdn) {
if !util.StringsMatch(a.Fqdn, b.Fqdn) {
return false
}

if !util.OptionalStringsMatch(a.IpWildcard, b.IpWildcard) {
if !util.StringsMatch(a.IpWildcard, b.IpWildcard) {
return false
}

Expand Down
Loading
Loading