-
Notifications
You must be signed in to change notification settings - Fork 1
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 support for custom collectors #307
base: main
Are you sure you want to change the base?
Conversation
|
||
cs, err := o.GetCollectorsByServiceName(ctx, in.ServiceName) | ||
if err != nil { | ||
return convertTtaeToAceWherePossible(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There shouldn't be any harm in invoking convertTtaeToAceWherePossible
here, but it shouldn't be necessary. This code invoked a Client
method, rather than talkToApstra()
, so any error should already have been converted to a ClientErr
.
@@ -474,6 +547,5 @@ func (o *RoutingZoneConstraintMode) FromString(s string) error { | |||
if t == nil { | |||
return fmt.Errorf("failed to parse RoutingZoneConstraintMode %q", s) | |||
} | |||
o.Value = t.Value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a line was deleted by mistake?
As previously discussed, this breaks out the Collectors as their own independent objects, hides some of the complexity of dealing with the API, giving a consistent CRUD interface.
There are some renaming and follow-up commits coming, but this outlines the logic that will be used.