ericholguin commented on code in PR #7701:
URL: https://github.com/apache/trafficcontrol/pull/7701#discussion_r1286285723


##########
traffic_ops/testing/api_contract/v4/test_delivery_service_health.py:
##########
@@ -0,0 +1,104 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""API Contract Test Case for delivery_service_health endpoint."""
+import logging
+from typing import Union
+import pytest
+import requests
+from jsonschema import validate
+
+from trafficops.tosession import TOSession
+
+# Create and configure logger
+logger = logging.getLogger()
+
+Primitive = Union[bool, int, float, str, None]
+
+
+def test_delivery_service_health_contract(to_session: TOSession,
+       response_template_data: dict[str, Union[Primitive, list[Union[Primitive,
+                                                       dict[str, object], 
list[object]]], dict[object, object]]],
+       delivery_services_post_data: dict[str, object]
+) -> None:
+       """
+       Test step to validate keys, values and data types from 
delivery_service_health endpoint

Review Comment:
   you're also validating routing and capacity



##########
traffic_control/clients/python/trafficops/tosession.py:
##########
@@ -426,6 +426,19 @@ def delete_cache_group_parameters(self, 
cache_group_id=None, parameter_id=None):
                :rtype: Tuple[Dict[str, Any], requests.Response]
                :raises: Union[LoginError, OperationError]
                """
+       
+       @api_request('post', 'cachegroups/{cache_group_id:d}/deliveryservices', 
('3.0', '4.0', '4.1', '5.0',))
+       def assign_cachegroups_to_deliveryservice(self, cache_group_id=None, 
data=None):
+               """
+               Assigns all of the “assignable” servers within a Cache Group to 
one or more Delivery Services.
+               :ref:`to-api-cachegroups-id-delivery_services`
+               :param cache_group_id: The Cache Group Id
+               :type cache_group_id: int
+               :param data: The update action. QueueUpdateRequest() can be 
used for this argument also.

Review Comment:
   bad copy?



-- 
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