mitchell852 closed pull request #2090: TO API - organizes routes by version
URL: https://github.com/apache/incubator-trafficcontrol/pull/2090
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/traffic_ops_golang/routes.go 
b/traffic_ops/traffic_ops_golang/routes.go
index 4d9619b25..5e3fb4779 100644
--- a/traffic_ops/traffic_ops_golang/routes.go
+++ b/traffic_ops/traffic_ops_golang/routes.go
@@ -68,136 +68,113 @@ func Routes(d ServerData) ([]Route, http.Handler, error) {
        proxyHandler := rootHandler(d)
 
        routes := []Route{
-               //About
-               {1.3, http.MethodGet, `about/?(\.json)?$`, about.Handler(), 
auth.PrivLevelReadOnly, Authenticated, nil},
-
-               // Proxied routes
-               //CDNs
-               // explicitly passed to legacy system until fully implemented.  
Auth handled by legacy system.
-               {1.2, http.MethodGet, `cdns/capacity$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-               {1.2, http.MethodGet, `cdns/configs$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-               {1.2, http.MethodGet, `cdns/dnsseckeys$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-               {1.2, http.MethodGet, `cdns/domains$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-               {1.2, http.MethodGet, `cdns/health$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-               {1.2, http.MethodGet, `cdns/routing$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
 
-               //Servers
-               // explicitly passed to legacy system until fully implemented.  
Auth handled by legacy system.
-               {1.2, http.MethodGet, `servers/checks$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-               {1.2, http.MethodGet, `servers/details$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-               {1.2, http.MethodGet, `servers/status$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
-               {1.2, http.MethodGet, `servers/totals$`, 
handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},
+               // ************************************************** 1.2 
Routes 
*************************************************************************************
+               // 1.2 routes are simply a Go replacement for the equivalent 
Perl route. They may or may not conform with the API guidelines 
(https://cwiki.apache.org/confluence/display/TC/API+Guidelines).
 
                //Monitoring
                {1.2, http.MethodGet, 
`cdns/{name}/configs/monitoring(\.json)?$`, monitoringHandler(d.DB), 
auth.PrivLevelReadOnly, Authenticated, nil},
 
-               //ASNs
-               {1.3, http.MethodGet, `asns/?(\.json)?$`, 
api.ReadHandler(asn.GetRefType(), d.DB), auth.PrivLevelReadOnly, Authenticated, 
nil},
-               {1.3, http.MethodGet, `asns/{id}$`, 
api.ReadHandler(asn.GetRefType(), d.DB), auth.PrivLevelReadOnly, Authenticated, 
nil},
-               {1.3, http.MethodPut, `asns/{id}$`, 
api.UpdateHandler(asn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodPost, `asns/?$`, 
api.CreateHandler(asn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodDelete, `asns/{id}$`, 
api.DeleteHandler(asn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-
-               //CDN generic handlers:
-               {1.3, http.MethodGet, `cdns/?(\.json)?$`, 
api.ReadHandler(cdn.GetRefType(), d.DB), auth.PrivLevelReadOnly, Authenticated, 
nil},
-               {1.3, http.MethodGet, `cdns/{id}$`, 
api.ReadHandler(cdn.GetRefType(), d.DB), auth.PrivLevelReadOnly, Authenticated, 
nil},
-               {1.3, http.MethodPut, `cdns/{id}$`, 
api.UpdateHandler(cdn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodPost, `cdns/?$`, 
api.CreateHandler(cdn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodDelete, `cdns/{id}$`, 
api.DeleteHandler(cdn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-
-               //Delivery service requests
-               {1.3, http.MethodGet, `deliveryservice_requests/?(\.json)?$`, 
api.ReadHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodGet, `deliveryservice_requests/{id}$`, 
api.ReadHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodPut, `deliveryservice_requests/{id}$`, 
api.UpdateHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
-               {1.3, http.MethodPost, `deliveryservice_requests/?$`, 
api.CreateHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
-               {1.3, http.MethodDelete, `deliveryservice_requests/{id}$`, 
api.DeleteHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
-               {1.3, http.MethodPut, `deliveryservice_requests/{id}/assign$`, 
api.UpdateHandler(dsrequest.GetAssignRefType(), d.DB), 
auth.PrivLevelOperations, Authenticated, nil},
-               {1.3, http.MethodPut, `deliveryservice_requests/{id}/status$`, 
api.UpdateHandler(dsrequest.GetStatusRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+               //System
+               {1.2, http.MethodGet, `system/info/?(\.json)?$`, 
systeminfo.Handler(d.DB), auth.PrivLevelReadOnly, Authenticated, nil},
 
-               //Delivery service request comments
-               {1.3, http.MethodGet, 
`deliveryservice_request_comments/?(\.json)?$`, 
api.ReadHandler(comment.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodGet, `deliveryservice_request_comments/{id}$`, 
api.ReadHandler(comment.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodPut, `deliveryservice_request_comments/{id}$`, 
api.UpdateHandler(comment.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
-               {1.3, http.MethodPost, `deliveryservice_request_comments/?$`, 
api.CreateHandler(comment.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
-               {1.3, http.MethodDelete, 
`deliveryservice_request_comments/{id}$`, 
api.DeleteHandler(comment.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+               // ************************************************** 1.3 
Routes 
*************************************************************************************
+               // 1.3 routes exist only in a Go. There is NO equivalent Perl 
route. They may or may not conform with the API guidelines 
(https://cwiki.apache.org/confluence/display/TC/API+Guidelines).
 
+               //Delivery service uri signing keys
                {1.3, http.MethodGet, `deliveryservices/{xmlID}/urisignkeys$`, 
getURIsignkeysHandler(d.DB, d.Config), auth.PrivLevelAdmin, Authenticated, nil},
                {1.3, http.MethodPost, `deliveryservices/{xmlID}/urisignkeys$`, 
saveDeliveryServiceURIKeysHandler(d.DB, d.Config), auth.PrivLevelAdmin, 
Authenticated, nil},
                {1.3, http.MethodPut, `deliveryservices/{xmlID}/urisignkeys$`, 
saveDeliveryServiceURIKeysHandler(d.DB, d.Config), auth.PrivLevelAdmin, 
Authenticated, nil},
                {1.3, http.MethodDelete, 
`deliveryservices/{xmlID}/urisignkeys$`, 
removeDeliveryServiceURIKeysHandler(d.DB, d.Config), auth.PrivLevelAdmin, 
Authenticated, nil},
 
+               //Servers
+               {1.3, http.MethodPost, `servers/{id}/deliveryservices$`, 
server.AssignDeliveryServicesToServerHandler(d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {1.3, http.MethodGet, `servers/{host_name}/update_status$`, 
server.GetServerUpdateStatusHandler(d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+
+               // ************************************************** 2.0 
Routes 
*************************************************************************************
+               // 2.0 routes conform with the API guidelines 
(https://cwiki.apache.org/confluence/display/TC/API+Guidelines).
+
+               //Ping
+               {2.0, http.MethodGet, `ping$`, ping.PingHandler(), 
auth.PrivLevelReadOnly, Authenticated, nil},
+
+               //About
+               {2.0, http.MethodGet, `about/?(\.json)?$`, about.Handler(), 
auth.PrivLevelReadOnly, Authenticated, nil},
+
+               //ASNs
+               {2.0, http.MethodGet, `asns/?(\.json)?$`, 
api.ReadHandler(asn.GetRefType(), d.DB), auth.PrivLevelReadOnly, Authenticated, 
nil},
+               {2.0, http.MethodPut, `asns/?$`, 
api.UpdateHandler(asn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodPost, `asns/?$`, 
api.CreateHandler(asn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodDelete, `asns/?$`, 
api.DeleteHandler(asn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+
+               //CDNs:
+               {2.0, http.MethodGet, `cdns/?(\.json)?$`, 
api.ReadHandler(cdn.GetRefType(), d.DB), auth.PrivLevelReadOnly, Authenticated, 
nil},
+               {2.0, http.MethodPut, `cdns/?$`, 
api.UpdateHandler(cdn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodPost, `cdns/?$`, 
api.CreateHandler(cdn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodDelete, `cdns/?$`, 
api.DeleteHandler(cdn.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+
+               //Delivery service requests
+               {2.0, http.MethodGet, `deliveryservice_requests/?(\.json)?$`, 
api.ReadHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {2.0, http.MethodPut, `deliveryservice_requests/?$`, 
api.UpdateHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+               {2.0, http.MethodPost, `deliveryservice_requests/?$`, 
api.CreateHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+               {2.0, http.MethodDelete, `deliveryservice_requests/?$`, 
api.DeleteHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+
+               {2.0, http.MethodPut, `deliveryservice_requests_assignee$`, 
api.UpdateHandler(dsrequest.GetAssignRefType(), d.DB), 
auth.PrivLevelOperations, Authenticated, nil},
+               {2.0, http.MethodPut, `deliveryservice_requests_status$`, 
api.UpdateHandler(dsrequest.GetStatusRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+
+               //Delivery service request comments
+               {2.0, http.MethodGet, 
`deliveryservice_request_comments/?(\.json)?$`, 
api.ReadHandler(comment.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {2.0, http.MethodPut, `deliveryservice_request_comments/?$`, 
api.UpdateHandler(comment.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+               {2.0, http.MethodPost, `deliveryservice_request_comments/?$`, 
api.CreateHandler(comment.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+               {2.0, http.MethodDelete, `deliveryservice_request_comments/?$`, 
api.DeleteHandler(comment.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
+
                //Phys_Locations
-               {1.3, http.MethodGet, `phys_locations/?(\.json)?$`, 
api.ReadHandler(physlocation.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodGet, `phys_locations/{id}$`, 
api.ReadHandler(physlocation.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodPut, `phys_locations/{id}$`, 
api.UpdateHandler(physlocation.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodPost, `phys_locations/?$`, 
api.CreateHandler(physlocation.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodDelete, `phys_locations/{id}$`, 
api.DeleteHandler(physlocation.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodGet, `phys_locations/?(\.json)?$`, 
api.ReadHandler(physlocation.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {2.0, http.MethodPut, `phys_locations/?$`, 
api.UpdateHandler(physlocation.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodPost, `phys_locations/?$`, 
api.CreateHandler(physlocation.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodDelete, `phys_locations/?$`, 
api.DeleteHandler(physlocation.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
                //Statuses
-               {1.3, http.MethodGet, `statuses/?(\.json)?$`, 
api.ReadHandler(status.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodGet, `statuses/{id}$`, 
api.ReadHandler(status.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodPut, `statuses/{id}$`, 
api.UpdateHandler(status.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodPost, `statuses/?$`, 
api.CreateHandler(status.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodDelete, `statuses/{id}$`, 
api.DeleteHandler(status.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodGet, `statuses/?(\.json)?$`, 
api.ReadHandler(status.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {2.0, http.MethodPut, `statuses/?$`, 
api.UpdateHandler(status.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodPost, `statuses/?$`, 
api.CreateHandler(status.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodDelete, `statuses/?$`, 
api.DeleteHandler(status.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
                //Types
-               {1.3, http.MethodGet, `types/?(\.json)?$`, 
api.ReadHandler(types.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodGet, `types/{id}$`, 
api.ReadHandler(types.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodPut, `types/{id}$`, 
api.UpdateHandler(types.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodPost, `types/?$`, 
api.CreateHandler(types.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodDelete, `types/{id}$`, 
api.DeleteHandler(types.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodGet, `types/?(\.json)?$`, 
api.ReadHandler(types.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {2.0, http.MethodPut, `types/?$`, 
api.UpdateHandler(types.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodPost, `types/?$`, 
api.CreateHandler(types.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodDelete, `types/?$`, 
api.DeleteHandler(types.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
                //Divisions
-               {1.3, http.MethodGet, `divisions/?(\.json)?$`, 
api.ReadHandler(division.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodGet, `divisions/{id}$`, 
api.ReadHandler(division.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodPut, `divisions/{id}$`, 
api.UpdateHandler(division.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodPost, `divisions/?$`, 
api.CreateHandler(division.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodDelete, `divisions/{id}$`, 
api.DeleteHandler(division.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-
-               //HWInfo
-               {1.2, http.MethodGet, `hwinfo-wip/?(\.json)?$`, 
hwinfo.HWInfoHandler(d.DB), auth.PrivLevelReadOnly, Authenticated, nil},
+               {2.0, http.MethodGet, `divisions/?(\.json)?$`, 
api.ReadHandler(division.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {2.0, http.MethodPut, `divisions/?$`, 
api.UpdateHandler(division.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodPost, `divisions/?$`, 
api.CreateHandler(division.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodDelete, `divisions/?$`, 
api.DeleteHandler(division.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
                //Regions
-               {1.3, http.MethodGet, `regions/?(\.json)?$`, 
api.ReadHandler(region.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodGet, `regions/{id}$`, 
api.ReadHandler(region.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodPut, `regions/{id}$`, 
api.UpdateHandler(region.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodPost, `regions/?$`, 
api.CreateHandler(region.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodDelete, `regions/{id}$`, 
api.DeleteHandler(region.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodGet, `regions/?(\.json)?$`, 
api.ReadHandler(region.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {2.0, http.MethodPut, `regions/?$`, 
api.UpdateHandler(region.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodPost, `regions/?$`, 
api.CreateHandler(region.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodDelete, `regions/?$`, 
api.DeleteHandler(region.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
                //Parameters
-               {1.3, http.MethodGet, `parameters/?(\.json)?$`, 
api.ReadHandler(parameter.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodGet, `parameters/{id}$`, 
api.ReadHandler(parameter.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodPut, `parameters/{id}$`, 
api.UpdateHandler(parameter.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodPost, `parameters/?$`, 
api.CreateHandler(parameter.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodDelete, `parameters/{id}$`, 
api.DeleteHandler(parameter.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-
-               //Ping
-               {1.2, http.MethodGet, `ping$`, ping.PingHandler(), 
auth.PrivLevelReadOnly, Authenticated, nil},
+               {2.0, http.MethodGet, `parameters/?(\.json)?$`, 
api.ReadHandler(parameter.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {2.0, http.MethodPut, `parameters/?$`, 
api.UpdateHandler(parameter.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodPost, `parameters/?$`, 
api.CreateHandler(parameter.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodDelete, `parameters/?$`, 
api.DeleteHandler(parameter.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
                //Servers
-               {1.2, http.MethodGet, `servers/?(\.json)?$`, 
api.ReadHandler(server.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.2, http.MethodGet, `servers/{id}$`, 
api.ReadHandler(server.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.2, http.MethodPut, `servers/{id}$`, 
api.UpdateHandler(server.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.2, http.MethodPost, `servers/?$`, 
api.CreateHandler(server.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.2, http.MethodDelete, `servers/{id}$`, 
api.DeleteHandler(server.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-
-               {1.2, http.MethodPost, `servers/{id}/deliveryservices$`, 
server.AssignDeliveryServicesToServerHandler(d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.2, http.MethodGet, `servers/{host_name}/update_status$`, 
server.GetServerUpdateStatusHandler(d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {2.0, http.MethodGet, `servers/?(\.json)?$`, 
api.ReadHandler(server.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {2.0, http.MethodPut, `servers/?$`, 
api.UpdateHandler(server.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodPost, `servers/?$`, 
api.CreateHandler(server.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodDelete, `servers/?$`, 
api.DeleteHandler(server.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
                //Profiles
-               {1.3, http.MethodGet, `profiles-wip/?(\.json)?$`, 
api.ReadHandler(profile.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodGet, `profiles-wip/{id}$`, 
api.ReadHandler(profile.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodPut, `profiles-wip/{id}$`, 
api.UpdateHandler(profile.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodPost, `profiles-wip/?$`, 
api.CreateHandler(profile.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodDelete, `profiles-wip/{id}$`, 
api.DeleteHandler(profile.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodGet, `profiles-wip/?(\.json)?$`, 
api.ReadHandler(profile.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {2.0, http.MethodPut, `profiles-wip/?$`, 
api.UpdateHandler(profile.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodPost, `profiles-wip/?$`, 
api.CreateHandler(profile.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {2.0, http.MethodDelete, `profiles-wip/?$`, 
api.DeleteHandler(profile.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
 
-               //SSLKeys deliveryservice endpoints here that are marked  
marked as '-wip' need to have tenancy checks added
-               {1.2, http.MethodGet, 
`deliveryservices-wip/xmlId/{xmlID}/sslkeys$`, 
getDeliveryServiceSSLKeysByXMLIDHandler(d.DB, d.Config), auth.PrivLevelAdmin, 
Authenticated, nil},
-               {1.2, http.MethodGet, 
`deliveryservices-wip/hostname/{hostName}/sslkeys$`, 
getDeliveryServiceSSLKeysByHostNameHandler(d.DB, d.Config), 
auth.PrivLevelAdmin, Authenticated, nil},
-               {1.2, http.MethodPost, 
`deliveryservices-wip/hostname/{hostName}/sslkeys/add$`, 
addDeliveryServiceSSLKeysHandler(d.DB, d.Config), auth.PrivLevelAdmin, 
Authenticated, nil},
-
-               //System
-               {1.2, http.MethodGet, `system/info/?(\.json)?$`, 
systeminfo.Handler(d.DB), auth.PrivLevelReadOnly, Authenticated, nil},
        }
        return routes, proxyHandler, nil
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to