rimashah25 commented on code in PR #7099:
URL: https://github.com/apache/trafficcontrol/pull/7099#discussion_r1013557339


##########
docs/source/api/v5/deliveryservice_requests.rst:
##########
@@ -159,38 +175,111 @@ The response is an array of representations of 
:term:`Delivery Service Requests`
                        "protocol": 2,
                        "qstringIgnore": 0,
                        "rangeRequestHandling": 0,
+                       "rangeSliceBlockSize": null,
                        "regexRemap": null,
-                       "regional": false,

Review Comment:
   We need this field. It was added in #7111 



##########
docs/source/api/v5/deliveryservice_requests.rst:
##########
@@ -815,24 +906,189 @@ The response is a full representation of the deleted 
:term:`Delivery Service Req
 .. code-block:: http
        :caption: Response Example
 
-       HTTP/1.1 200 OK
+       HTTP/1.1 200 OK HTTP/1.1 200 OK
        Access-Control-Allow-Credentials: true
        Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, 
Accept, Set-Cookie, Cookie
        Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
        Access-Control-Allow-Origin: *
        Content-Encoding: gzip
        Content-Type: application/json
-       Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 24 Feb 2020 20:48:55 
GMT; Max-Age=3600; HttpOnly
-       Whole-Content-Sha512: 
jNCbNo8Tw+JMMaWpAYQgntSXPq2Xuj+n2zSEVRaDQFWMV1SYbT9djes6SPdwiBoKq6W0lNE04hOE92jBVcjtEw==
+       Permissions-Policy: interest-cohort=()
+       Set-Cookie: mojolicious=...; Path=/; Expires=Thu, 29 Sep 2022 23:26:31 
GMT; Max-Age=3600; HttpOnly, access_token=...; Path=/; Expires=Thu, 29 Sep 2022 
23:26:31 GMT; Max-Age=3600; HttpOnly
+       Vary: Accept-Encoding
        X-Server-Name: traffic_ops_golang/
-       Date: Mon, 24 Feb 2020 19:48:55 GMT
-       Content-Length: 96
+       Date: Thu, 29 Sep 2022 22:26:31 GMT
+       Content-Length: 1147
 
-       {
-               "alerts": [
-                       {
-                               "text": "deliveryservice_request was deleted.",
-                               "level": "success"
-                       }
-               ]
-       }
+       { "alerts": [{
+               "text": "Delivery Service Request #1 deleted",
+               "level": "success"
+       }],
+       "response": {
+               "assignee": "admin",
+               "author": "admin",
+               "changeType": "update",
+               "createdAt": "2022-09-29T22:07:15.008503Z",
+               "id": 1,
+               "lastEditedBy": "admin",
+               "lastUpdated": "2022-09-29T22:23:28.034845Z",
+               "original": {
+                       "active": "ACTIVE",
+                       "anonymousBlockingEnabled": false,
+                       "ccrDnsTtl": null,
+                       "cdnId": 2,
+                       "cdnName": "CDN-in-a-Box",
+                       "checkPath": null,
+                       "consistentHashQueryParams": [
+                               "abc",
+                               "pdq",
+                               "xxx",
+                               "zyx"
+                       ],
+                       "consistentHashRegex": null,
+                       "deepCachingType": "NEVER",
+                       "displayName": "Demo 1",
+                       "dnsBypassCname": null,
+                       "dnsBypassIp": null,
+                       "dnsBypassIp6": null,
+                       "dnsBypassTtl": null,
+                       "dscp": 0,
+                       "ecsEnabled": false,
+                       "edgeHeaderRewrite": null,
+                       "exampleURLs": [
+                               "http://video.demo1.mycdn.ciab.test";,
+                               "https://video.demo1.mycdn.ciab.test";
+                       ],
+                       "firstHeaderRewrite": null,
+                       "fqPacingRate": null,
+                       "geoLimit": 0,
+                       "geoLimitCountries": null,
+                       "geoLimitRedirectURL": null,
+                       "geoProvider": 0,
+                       "globalMaxMbps": null,
+                       "globalMaxTps": null,
+                       "httpBypassFqdn": null,
+                       "id": 1,
+                       "infoUrl": null,
+                       "initialDispersion": 1,
+                       "innerHeaderRewrite": null,
+                       "ipv6RoutingEnabled": true,
+                       "lastHeaderRewrite": null,
+                       "lastUpdated": "2022-09-29T20:58:53.07251Z",
+                       "logsEnabled": true,
+                       "longDesc": "Apachecon North America 2018",
+                       "matchList": [
+                               {
+                                       "type": "HOST_REGEXP",
+                                       "setNumber": 0,
+                                       "pattern": ".*\\.demo1\\..*"
+                               }
+                       ],
+                       "maxDnsAnswers": null,
+                       "maxOriginConnections": 0,
+                       "maxRequestHeaderBytes": 0,
+                       "midHeaderRewrite": null,
+                       "missLat": 42,
+                       "missLong": -88,
+                       "multiSiteOrigin": true,
+                       "originShield": null,
+                       "orgServerFqdn": "http://origin.infra.ciab.test";,
+                       "profileDescription": null,
+                       "profileId": null,
+                       "profileName": null,
+                       "protocol": 2,
+                       "qstringIgnore": 0,
+                       "rangeRequestHandling": 0,
+                       "rangeSliceBlockSize": null,
+                       "regexRemap": null,
+                       "regionalGeoBlocking": false,

Review Comment:
   Do we need a regional field?



##########
docs/source/api/v5/deliveryservice_requests.rst:
##########
@@ -663,59 +504,315 @@ The response is a full representation of the edited 
:term:`Delivery Service Requ
                        "protocol": 2,
                        "qstringIgnore": 0,
                        "rangeRequestHandling": 0,
+                       "rangeSliceBlockSize": null,
                        "regexRemap": null,
                        "regional": false,
                        "regionalGeoBlocking": false,
                        "remapText": null,
                        "routingName": "video",
+                       "serviceCategory": null,
                        "signed": false,
-                       "sslKeyVersion": 1,
-                       "tenantId": 1,
-                       "type": "HTTP",
-                       "typeId": 1,
-                       "xmlId": "demo1",
-                       "exampleURLs": [
-                               "http://video.demo1.mycdn.ciab.test";,
-                               "https://video.demo1.mycdn.ciab.test";
-                       ],
-                       "deepCachingType": "NEVER",
-                       "fqPacingRate": null,
                        "signingAlgorithm": null,
+                       "sslKeyVersion": 1,
                        "tenant": "root",
+                       "tenantId": 1,
+                       "tlsVersions": null,
+                       "topology": "demo1-top",
                        "trResponseHeaders": null,
                        "trRequestHeaders": null,
-                       "consistentHashRegex": null,
+                       "type": "HTTP",
+                       "typeId": 1,
+                       "xmlId": "demo1"
+               },
+               "requested": {
+                       "active": "INACTIVE",
+                       "anonymousBlockingEnabled": false,
+                       "ccrDnsTtl": null,
+                       "cdnId": 2,
+                       "cdnName": "CDN-in-a-Box",
+                       "checkPath": null,
                        "consistentHashQueryParams": [
                                "abc",
                                "pdq",
                                "xxx",
                                "zyx"
                        ],
-                       "maxOriginConnections": 0,
+                       "consistentHashRegex": null,
+                       "deepCachingType": "NEVER",
+                       "displayName": "Demo 1",
+                       "dnsBypassCname": null,
+                       "dnsBypassIp": null,
+                       "dnsBypassIp6": null,
+                       "dnsBypassTtl": null,
+                       "dscp": 0,
                        "ecsEnabled": false,
-                       "rangeSliceBlockSize": null,
-                       "topology": "demo1-top",
+                       "edgeHeaderRewrite": null,
+                       "exampleURLs": [
+                               "http://video.demo1.mycdn.ciab.test";,
+                               "https://video.demo1.mycdn.ciab.test";
+                       ],
                        "firstHeaderRewrite": null,
+                       "fqPacingRate": null,
+                       "geoLimit": 0,
+                       "geoLimitCountries": null,
+                       "geoLimitRedirectURL": null,
+                       "geoProvider": 0,
+                       "globalMaxMbps": null,
+                       "globalMaxTps": null,
+                       "httpBypassFqdn": null,
+                       "id": 1,
+                       "infoUrl": null,
+                       "initialDispersion": 1,
                        "innerHeaderRewrite": null,
+                       "ipv6RoutingEnabled": true,
                        "lastHeaderRewrite": null,
+                       "lastUpdated": "2020-02-13T16:43:54Z",

Review Comment:
   I am assuming because we are requesting, lastUpdated doesn't have to be in 
RFC3339 time format?



##########
docs/source/api/v5/deliveryservice_requests.rst:
##########
@@ -214,18 +303,19 @@ The request must be a well-formed representation of a 
:term:`Delivery Service Re
        :caption: Request Example
 
        POST /api/5.0/deliveryservice_requests HTTP/1.1
-       User-Agent: python-requests/2.22.0
+       User-Agent: python-requests/2.25.1
        Accept-Encoding: gzip, deflate
        Accept: */*
        Connection: keep-alive
-       Cookie: mojolicious=...
-       Content-Length: 1979
+       Cookie: access_token=...; mojolicious=...
+       Content-Length: 2011
+       Content-Type: application/json
 
        {
                "changeType": "update",
                "status": "draft",
                "requested": {
-                       "active": false,
+                       "active": "INACTIVE",

Review Comment:
   L346 doesn't that the time format?



##########
docs/source/api/v5/deliveryservices_id.rst:
##########
@@ -400,20 +404,25 @@ Response Structure
        Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, 
Accept, Set-Cookie, Cookie
        Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
        Access-Control-Allow-Origin: *
+       Content-Encoding: gzip
        Content-Type: application/json
-       Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 18 Nov 2019 17:40:54 
GMT; Max-Age=3600; HttpOnly
-       Whole-Content-Sha512: 
w9NlQpJJEl56r6iYq/fk8o5WfAXeUS5XR9yDHvKUgPO8lYEo8YyftaSF0MPFseeOk60dk6kQo+MLYTDIAhhRxw==
+       Permissions-Policy: interest-cohort=()
+       Set-Cookie: mojolicious=...; Path=/; Expires=Thu, 29 Sep 2022 22:59:08 
GMT; Max-Age=3600; HttpOnly, access_token=...; Path=/; Expires=Thu, 29 Sep 2022 
22:59:08 GMT; Max-Age=3600; HttpOnly
+       Vary: Accept-Encoding
        X-Server-Name: traffic_ops_golang/
-       Date: Tue, 20 Nov 2018 14:56:37 GMT
-       Content-Length: 57
+       Date: Thu, 29 Sep 2022 21:59:08 GMT
+       Content-Length: 161
 
        { "alerts": [
                {
                        "text": "ds was deleted.",
                        "level": "success"
+               },
+               {
+                       "text": "Perform a CDN snapshot then queue updates on 
all servers in the cdn for the changes to take effect.",
+                       "level": "info"

Review Comment:
   Should we add similar kind of info in PUT (update)/POST(create) too?



##########
traffic_ops/testing/api/v5/tc-fixtures.json:
##########
@@ -341,7 +341,7 @@
         {

Review Comment:
   Do we need to have `regional` in the DSs's and DSR's json?



##########
docs/source/api/v5/deliveryservice_requests.rst:
##########
@@ -815,24 +906,189 @@ The response is a full representation of the deleted 
:term:`Delivery Service Req
 .. code-block:: http
        :caption: Response Example
 
-       HTTP/1.1 200 OK
+       HTTP/1.1 200 OK HTTP/1.1 200 OK
        Access-Control-Allow-Credentials: true
        Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, 
Accept, Set-Cookie, Cookie
        Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
        Access-Control-Allow-Origin: *
        Content-Encoding: gzip
        Content-Type: application/json
-       Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 24 Feb 2020 20:48:55 
GMT; Max-Age=3600; HttpOnly
-       Whole-Content-Sha512: 
jNCbNo8Tw+JMMaWpAYQgntSXPq2Xuj+n2zSEVRaDQFWMV1SYbT9djes6SPdwiBoKq6W0lNE04hOE92jBVcjtEw==
+       Permissions-Policy: interest-cohort=()
+       Set-Cookie: mojolicious=...; Path=/; Expires=Thu, 29 Sep 2022 23:26:31 
GMT; Max-Age=3600; HttpOnly, access_token=...; Path=/; Expires=Thu, 29 Sep 2022 
23:26:31 GMT; Max-Age=3600; HttpOnly
+       Vary: Accept-Encoding
        X-Server-Name: traffic_ops_golang/
-       Date: Mon, 24 Feb 2020 19:48:55 GMT
-       Content-Length: 96
+       Date: Thu, 29 Sep 2022 22:26:31 GMT
+       Content-Length: 1147
 
-       {
-               "alerts": [
-                       {
-                               "text": "deliveryservice_request was deleted.",
-                               "level": "success"
-                       }
-               ]
-       }
+       { "alerts": [{
+               "text": "Delivery Service Request #1 deleted",
+               "level": "success"
+       }],
+       "response": {
+               "assignee": "admin",
+               "author": "admin",
+               "changeType": "update",
+               "createdAt": "2022-09-29T22:07:15.008503Z",
+               "id": 1,
+               "lastEditedBy": "admin",
+               "lastUpdated": "2022-09-29T22:23:28.034845Z",
+               "original": {
+                       "active": "ACTIVE",
+                       "anonymousBlockingEnabled": false,
+                       "ccrDnsTtl": null,
+                       "cdnId": 2,
+                       "cdnName": "CDN-in-a-Box",
+                       "checkPath": null,
+                       "consistentHashQueryParams": [
+                               "abc",
+                               "pdq",
+                               "xxx",
+                               "zyx"
+                       ],
+                       "consistentHashRegex": null,
+                       "deepCachingType": "NEVER",
+                       "displayName": "Demo 1",
+                       "dnsBypassCname": null,
+                       "dnsBypassIp": null,
+                       "dnsBypassIp6": null,
+                       "dnsBypassTtl": null,
+                       "dscp": 0,
+                       "ecsEnabled": false,
+                       "edgeHeaderRewrite": null,
+                       "exampleURLs": [
+                               "http://video.demo1.mycdn.ciab.test";,
+                               "https://video.demo1.mycdn.ciab.test";
+                       ],
+                       "firstHeaderRewrite": null,
+                       "fqPacingRate": null,
+                       "geoLimit": 0,
+                       "geoLimitCountries": null,
+                       "geoLimitRedirectURL": null,
+                       "geoProvider": 0,
+                       "globalMaxMbps": null,
+                       "globalMaxTps": null,
+                       "httpBypassFqdn": null,
+                       "id": 1,
+                       "infoUrl": null,
+                       "initialDispersion": 1,
+                       "innerHeaderRewrite": null,
+                       "ipv6RoutingEnabled": true,
+                       "lastHeaderRewrite": null,
+                       "lastUpdated": "2022-09-29T20:58:53.07251Z",
+                       "logsEnabled": true,
+                       "longDesc": "Apachecon North America 2018",
+                       "matchList": [
+                               {
+                                       "type": "HOST_REGEXP",
+                                       "setNumber": 0,
+                                       "pattern": ".*\\.demo1\\..*"
+                               }
+                       ],
+                       "maxDnsAnswers": null,
+                       "maxOriginConnections": 0,
+                       "maxRequestHeaderBytes": 0,
+                       "midHeaderRewrite": null,
+                       "missLat": 42,
+                       "missLong": -88,
+                       "multiSiteOrigin": true,
+                       "originShield": null,
+                       "orgServerFqdn": "http://origin.infra.ciab.test";,
+                       "profileDescription": null,
+                       "profileId": null,
+                       "profileName": null,
+                       "protocol": 2,
+                       "qstringIgnore": 0,
+                       "rangeRequestHandling": 0,
+                       "rangeSliceBlockSize": null,
+                       "regexRemap": null,
+                       "regionalGeoBlocking": false,
+                       "remapText": null,
+                       "routingName": "video",
+                       "serviceCategory": null,
+                       "signed": false,
+                       "signingAlgorithm": null,
+                       "sslKeyVersion": 1,
+                       "tenant": "root",
+                       "tenantId": 1,
+                       "tlsVersions": null,
+                       "topology": "demo1-top",
+                       "trResponseHeaders": null,
+                       "trRequestHeaders": null,
+                       "type": "HTTP",
+                       "typeId": 1,
+                       "xmlId": "demo1"
+               },
+               "requested": {
+                       "active": "INACTIVE",
+                       "anonymousBlockingEnabled": false,
+                       "ccrDnsTtl": 30,
+                       "cdnId": 2,
+                       "cdnName": null,
+                       "checkPath": null,
+                       "consistentHashQueryParams": null,
+                       "consistentHashRegex": null,
+                       "deepCachingType": "NEVER",
+                       "displayName": "Demo 1 but I modified the DSR",
+                       "dnsBypassCname": null,
+                       "dnsBypassIp": null,
+                       "dnsBypassIp6": null,
+                       "dnsBypassTtl": null,
+                       "dscp": 0,
+                       "ecsEnabled": false,
+                       "edgeHeaderRewrite": null,
+                       "exampleURLs": null,
+                       "firstHeaderRewrite": null,
+                       "fqPacingRate": null,
+                       "geoLimit": 0,
+                       "geoLimitCountries": null,
+                       "geoLimitRedirectURL": null,
+                       "geoProvider": 0,
+                       "globalMaxMbps": null,
+                       "globalMaxTps": null,
+                       "httpBypassFqdn": null,
+                       "id": 1,
+                       "infoUrl": null,
+                       "initialDispersion": 3,
+                       "innerHeaderRewrite": null,
+                       "ipv6RoutingEnabled": null,
+                       "lastHeaderRewrite": null,
+                       "lastUpdated": "0001-01-01T00:00:00Z",
+                       "logsEnabled": false,
+                       "longDesc": "long desc",
+                       "matchList": null,
+                       "maxDnsAnswers": null,
+                       "maxOriginConnections": 0,
+                       "maxRequestHeaderBytes": 0,
+                       "midHeaderRewrite": null,
+                       "missLat": null,
+                       "missLong": null,
+                       "multiSiteOrigin": false,
+                       "originShield": null,
+                       "orgServerFqdn": null,
+                       "profileDescription": null,
+                       "profileId": null,
+                       "profileName": null,
+                       "protocol": null,
+                       "qstringIgnore": null,
+                       "rangeRequestHandling": null,
+                       "rangeSliceBlockSize": null,
+                       "regexRemap": null,
+                       "regionalGeoBlocking": false,

Review Comment:
   Here too, the regional field?



##########
traffic_ops/testing/api/v3/tc-fixtures.json:
##########
@@ -858,7 +858,7 @@
             "regexRemap": null,
             "regionalGeoBlocking": false,
             "remapText": null,
-            "routingName": "cdn",

Review Comment:
   Based on what we spoke over slack, do we still need this change?



##########
traffic_ops/testing/api/v4/tc-fixtures.json:
##########
@@ -907,7 +907,7 @@
             "regexRemap": null,
             "regionalGeoBlocking": false,
             "remapText": null,
-            "routingName": "cdn",
+            "routingName": "ccr-ds1",

Review Comment:
   Do we still need this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to