Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Prohibit assigning topology-based delivery services to caches#4702

Merged
dneuman64 merged 2 commits intoapache:masterfrom
rawlinp:topologies-dss
Jun 1, 2020
Merged

Prohibit assigning topology-based delivery services to caches#4702
dneuman64 merged 2 commits intoapache:masterfrom
rawlinp:topologies-dss

Conversation

@rawlinp
Copy link
Copy Markdown
Contributor

@rawlinp rawlinp commented May 19, 2020

What does this PR (Pull Request) do?

Update the following endpoints to prevent assigning caches to delivery services that have a topology assigned:

POST servers/{id}/deliveryservices
POST deliveryservices/{xml_id}/servers
POST deliveryserviceserver
POST cachegroups/{id}/deliveryservices

Which Traffic Control components are affected by this PR?

  • Traffic Control Client (Go)
  • Traffic Ops

What is the best way to verify this PR?

Run the unit tests. Run the TO API tests (negative tests were added for all 4 routes). Verify they all pass.

The following criteria are ALL met by this PR

  • This PR includes tests
  • New validation, no docs changes necessary
  • This PR includes an update to CHANGELOG.md
  • This PR includes any and all required license headers
  • This PR does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@rawlinp rawlinp added new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops TO Client (Go) related to the Go implementation of a TC client labels May 19, 2020
@rawlinp rawlinp force-pushed the topologies-dss branch 3 times, most recently from 20f3120 to 63b031f Compare May 27, 2020 21:52
@rawlinp rawlinp marked this pull request as ready for review May 27, 2020 22:00
Copy link
Copy Markdown
Member

@zrhoffman zrhoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API tests pass, unit tests pass, code is formatted correctly, and manual testing confirms you can't assign a topology-based delivery service to an edge cache bug you can assign it an origin.

Just a couple of comments about error messages. Besides that, this looks good.

Comment thread traffic_ops/testing/api/v3/deliveryserviceservers_test.go Outdated
Comment thread traffic_ops/testing/api/v3/deliveryserviceservers_test.go Outdated
Comment thread traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go Outdated
Comment thread traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go Outdated
Comment thread traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go Outdated
Copy link
Copy Markdown
Member

@zrhoffman zrhoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

new feature A new feature, capability or behavior TO Client (Go) related to the Go implementation of a TC client Traffic Ops related to Traffic Ops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants