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 TO Go cachegroups/id/deliveryservices #2300
Conversation
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
traffic_ops/client/v13/server.go
Outdated
return resp, reqInf, nil | ||
} | ||
|
||
func (to *Session) GetDeliveryServiceServers() (tc.DeliveryServiceServerResponse, ReqInf, error) { |
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.
This method conflicts with the method here: https://github.com/apache/trafficcontrol/blob/master/traffic_ops/client/v13/deliveryserviceserver.go#L26
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.
Fixed
traffic_ops/client/v13/server.go
Outdated
@@ -131,3 +133,33 @@ func (to *Session) DeleteServerByID(id int) (tc.Alerts, ReqInf, error) { | |||
err = json.NewDecoder(resp.Body).Decode(&alerts) | |||
return alerts, reqInf, nil | |||
} | |||
|
|||
func (to *Session) DeleteDeliveryServiceServer(dsID int, serverID int) (tc.Alerts, ReqInf, error) { |
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.
This method conflicts with the method here: https://github.com/apache/trafficcontrol/blob/master/traffic_ops/client/v13/deliveryserviceserver.go#L59
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.
Fixed. I left these, and removed the others, because these return more data.
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Rebased, API tests pass, unit tests pass. |
Refer to this link for build results (access rights to CI server needed): |
} | ||
|
||
// FinishTx commits the transaction if commit is true when it's called, otherwise it rolls back the transaction. This is designed to be called in a defer. | ||
func FinishTx(tx *sql.Tx, commit *bool) { |
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.
Is this something that needs to be implemented on all Handlers now?
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.
No, this was a legacy thing, because this PR was made before everything was changed to use transactions. I removed it.
Refer to this link for build results (access rights to CI server needed): |
What does this PR do?
Add TO Go cachegroups/id/deliveryservices
Which TC components are affected by this PR?
What is the best way to verify this PR?
POST /api/1.2/cachegroups/id/deliveryservices/
Check all that apply