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

Conversation

@serDrem
Copy link
Contributor

@serDrem serDrem commented Apr 5, 2023

Adding a new OC endpoint compatible with current SVTA OC API testbed. DeleteConfiguration deletes CDNi configuration for ucdn specified in JWT.

Which Traffic Control components are affected by this PR?

  • Documentation

What is the best way to verify this PR?

You can use the SVTA OC API testbed, which is not open to the public but we have access to it through SVTA members, to validate that this endpoint as well other endpoints work.

PR submission checklist

  • [0] This PR has tests - None of the current CDNi endpoints have tests and this one as well.
  • This PR has documentation
  • This PR has a CHANGELOG.md entry
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Merging #7432 (709c937) into master (904e240) will decrease coverage by 0.02%.
The diff coverage is 3.03%.

@@             Coverage Diff              @@
##             master    #7432      +/-   ##
============================================
- Coverage     27.12%   27.11%   -0.02%     
  Complexity       98       98              
============================================
  Files           685      685              
  Lines         77414    77447      +33     
  Branches         90       90              
============================================
  Hits          20999    20999              
- Misses        54423    54456      +33     
  Partials       1992     1992              
Flag Coverage Δ
golib_unit 48.40% <ø> (-0.01%) ⬇️
grove_unit 4.60% <ø> (ø)
t3c_unit 5.32% <ø> (ø)
traffic_monitor_unit 21.28% <ø> (ø)
traffic_ops_integration 69.42% <ø> (ø)
traffic_ops_unit 22.17% <3.03%> (-0.02%) ⬇️
traffic_stats_unit 10.14% <ø> (ø)
unit_tests 23.68% <3.03%> (-0.02%) ⬇️
v3 57.79% <ø> (ø)
v4 79.18% <ø> (ø)
v5 78.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
traffic_ops/traffic_ops_golang/cdni/shared.go 0.00% <0.00%> (ø)
traffic_ops/traffic_ops_golang/routing/routes.go 95.54% <100.00%> (+<0.01%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@zrhoffman zrhoffman added new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops authentication Relating to login, registration, passwords, tokens, etc. labels Apr 5, 2023
@srijeet0406 srijeet0406 self-requested a review April 5, 2023 17:36

## [unreleased]
### Added
- *Traffic Ops* Added cdni capabilities delete endpoint
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you pls add the PR number and link, like in the other changelog entries?

]}

``DELETE``
=======
Copy link
Contributor

Choose a reason for hiding this comment

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

The underline looks to be too short.

}
defer inf.Close()

if inf.Config.Cdni == nil || inf.Config.Secrets[0] == "" || inf.Config.Cdni.DCdnId == "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

If inf.Config.Secrets has a length of 0, the second condition check will cause a panic. Could you pls add a check for that as well?


:Auth. Required: Yes
:Roles Required: "admin" or "operations"
:Permissions Required: CDNI:DELETE
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be CDNI-CAPACITY:DELETE as specified in the actual route?

@srijeet0406
Copy link
Contributor

I know that the other CDNi routes do not have tests, but could you please add some tests for this new endpoint? That way we can follow the same pattern for the other CDNi route tests.

@ocket8888 ocket8888 added the low impact affects only a small portion of a CDN, and cannot itself break one label Apr 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

authentication Relating to login, registration, passwords, tokens, etc. low impact affects only a small portion of a CDN, and cannot itself break one new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants