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

[TC-32] Addition of ATS Config API#199

Closed
dg4prez wants to merge 18 commits intoapache:masterfrom
dg4prez:ats_api_config
Closed

[TC-32] Addition of ATS Config API#199
dg4prez wants to merge 18 commits intoapache:masterfrom
dg4prez:ats_api_config

Conversation

@dg4prez
Copy link
Contributor

@dg4prez dg4prez commented Jan 19, 2017

Working API for ATS config file generation, divided by three "scopes" - CDN, profile, and server.

This is intended to be used for a redesign of the ATS config process. No test files have been generated yet - this PR is intended for review only, and is linked to https://issues.apache.org/jira/browse/TC-32

Should be ready for test and merge.

@dg4prez dg4prez changed the title [TC-32] Addition of ATS Config API - Do not merge [TC-32] Addition of ATS Config API Jan 19, 2017
@dg4prez dg4prez closed this Jan 23, 2017
@dg4prez dg4prez reopened this Jan 23, 2017
Copy link
Member

Choose a reason for hiding this comment

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

i thought you got rid of "scope" parameters?

Copy link
Member

Choose a reason for hiding this comment

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

i thought you got rid of "scope" parameters?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, i did. missed that lookup.

@mitchell852
Copy link
Member

There have been several changes to ConfigFiles.pm since this PR was submitted:

git log traffic_ops/applib/UI/ConfigFiles.pm

so you might want to makes sure those changes are addressed in the PR...

@dg4prez dg4prez force-pushed the ats_api_config branch 2 times, most recently from 543f984 to d0e7df0 Compare February 17, 2017 21:20
@knutsel
Copy link
Member

knutsel commented Feb 25, 2017

hey @dg4prez - your new test fails for me?

./t/api/1.2/config_files_apache_traffic_server.t .. Subroutine TrafficOps::has redefined at /home/jvd/work/gh/knutsel/incubator-trafficcontrol/traffic_ops/app/local/lib/perl5/Mojo/Base.pm line 38.
Subroutine TrafficOps::has redefined at /home/jvd/work/gh/knutsel/incubator-trafficcontrol/traffic_ops/app/local/lib/perl5/Mojo/Base.pm line 38.

Loading config from /home/jvd/work/gh/knutsel/incubator-trafficcontrol/traffic_ops/app/conf/cdn.conf
Reading log4perl config from /home/jvd/work/gh/knutsel/incubator-trafficcontrol/traffic_ops/app/conf/test/log4perl.conf
Setting mojo inactivity timeout to 60
-------------------------------------------------------------
Loading Mojo Routes from package: TrafficOpsRoutes
-------------------------------------------------------------
[Sat Feb 25 21:50:28 2017] [info] admin was found in the database.
[Sat Feb 25 21:50:28 2017] [debug] Password matched.
ok 1 - POST /login
ok 2 - 302 Found
ok 3 - Should login?
ok 4 - GET /api/1.2/server/100/configfiles/ats
ok 5 - 200 OK
ok 6
ok 7 - GET /api/1.2/server/100/configfiles/ats/12M_facts
ok 8 - 200 OK
ok 9
ok 10 - GET /api/1.2/server/100/configfiles/ats/ip_allow.config
ok 11 - 200 OK
ok 12
ok 13 - GET /api/1.2/server/100/configfiles/ats/crontab_root
ok 14 - 200 OK
ok 15
ok 16 - GET /api/1.2/server/100/configfiles/ats/remap.config
ok 17 - 200 OK
ok 18
ok 19 - GET /api/1.2/server/100/configfiles/ats/parent.config
ok 20 - 200 OK
ok 21
ok 22 - GET /api/1.2/server/100/configfiles/ats/cache.config
ok 23 - 200 OK
ok 24
ok 25 - GET /api/1.2/server/100/configfiles/ats/hosting.config
ok 26 - 200 OK
ok 27
ok 28 - GET /api/1.2/cdn/cdn1/configfiles/ats/cacheurl.config
ok 29 - 200 OK
ok 30
ok 31 - GET /api/1.2/cdn/cdn1/configfiles/ats/regex_revalidate.config
ok 32 - 200 OK
ok 33
ok 34 - GET /api/1.2/cdn/cdn1/configfiles/ats/hdr_rw_cdl-c2.config
not ok 35 - 200 OK

#   Failed test '200 OK'
#   at ./t/api/1.2/config_files_apache_traffic_server.t line 57.
#          got: '400'
#     expected: '200'
# {"alerts":[{"level":"error","text":"Error - incorrect file scope for route used.  Please use the server route."}]}
ok 36
ok 37 - GET /api/1.2/profile/100/configfiles/ats/50-ats.rules
ok 38 - 200 OK
ok 39
ok 40 - GET /api/1.2/profile/100/configfiles/ats/drop_qstring.config
ok 41 - 200 OK
ok 42
ok 43 - GET /api/1.2/profile/100/configfiles/ats/volume.config
ok 44 - 200 OK
ok 45
ok 46 - GET /api/1.2/profile/100/configfiles/ats/astats.config
ok 47 - 200 OK
ok 48
ok 49 - GET /api/1.2/profile/100/configfiles/ats/storage.config
ok 50 - 200 OK
ok 51
ok 52 - GET /api/1.2/deliveryservices/list?logsEnabled=true
ok 53 - 200 OK
ok 54
DBIx::Class::ResultSet::_resolved_attrs(): Useless use of distinct on a grouped resultset ('distinct' is ignored when a 'group_by' is present) at /home/jvd/work/gh/knutsel/incubator-trafficcontrol/traffic_ops/app/lib/UI/Topology.pm line 79
ok 55 - PUT /api/1.2/snapshot/cdn1
ok 56 - 200 OK
ok 57
ok 58 - GET /logout
ok 59 - 302 Found
ok 60
1..60
# Looks like you failed 1 test of 60.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/60 subtests

Test Summary Report
-------------------
./t/api/1.2/config_files_apache_traffic_server.t (Wstat: 256 Tests: 60 Failed: 1)
  Failed test:  35
  Non-zero exit status: 1
Files=1, Tests=60,  6 wallclock secs ( 0.04 usr  0.01 sys +  4.14 cusr  0.83 csys =  5.02 CPU)
Result: FAIL
[jvd@jvd-knutsel-4 app (master *$>)]$```

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants