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

Cachegroups API updates for Topologies#4695

Merged
ocket8888 merged 3 commits intoapache:masterfrom
rawlinp:cachegroups-topologies
May 18, 2020
Merged

Cachegroups API updates for Topologies#4695
ocket8888 merged 3 commits intoapache:masterfrom
rawlinp:cachegroups-topologies

Conversation

@rawlinp
Copy link
Copy Markdown
Contributor

@rawlinp rawlinp commented May 15, 2020

What does this PR (Pull Request) do?

Add support for topology query param on GET /api/3.0/cachegroups API. Return a useful error message when attempting to delete a cachegroup that is used in a Topology.

Which Traffic Control components are affected by this PR?

  • Documentation
  • Traffic Control Client (Go)
  • Traffic Ops

What is the best way to verify this PR?

Run the unit tests, verify they pass. Run the TO API tests, verify they pass. Attempt to delete a cachegroup that is assigned to a topology, verify that a useful error message is returned.

The following criteria are ALL met by this PR

  • This PR includes tests
  • This PR includes documentation
  • 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 added 2 commits May 15, 2020 09:26
- for GET /cachegroups add support for a topology query param for
  returning all cachegroups that are used in a given topology
- for DELETE /cachegroups/:id return an informative error message
  if trying to delete a cachegroup that is currently used by a topology
@rawlinp rawlinp added new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops documentation related to documentation tests related to tests and/or testing infrastructure TO Client (Go) related to the Go implementation of a TC client labels May 15, 2020
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.

This looks good. Docs build, code is formatted correctly, and API tests pass. I left a few suggestions, but they are all optional.

Comment thread traffic_ops/client/cachegroup.go Outdated
Comment thread traffic_ops/traffic_ops_golang/cachegroup/cachegroups.go Outdated
Comment thread traffic_ops/testing/api/v3/cachegroups_test.go
Comment thread traffic_ops/client/cachegroup.go
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 still pass, code is still formatted correctly. Looks good to me!

@ocket8888 ocket8888 merged commit f21b973 into apache:master May 18, 2020
@rawlinp rawlinp deleted the cachegroups-topologies branch May 20, 2020 17:33
@zrhoffman zrhoffman added this to the Flexible Topologies milestone Sep 18, 2020
@zrhoffman zrhoffman removed this from the Flexible Topologies milestone Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation related to documentation new feature A new feature, capability or behavior tests related to tests and/or testing infrastructure 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.

Update /cachegroups endpoints for Topologies

3 participants