You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "gokulakrishnansvm (via GitHub)" <gi...@apache.org> on 2023/08/04 21:13:49 UTC
[GitHub] [trafficcontrol] gokulakrishnansvm commented on a diff in pull request #7695: Added Api contract test case for Service categories endpoint
gokulakrishnansvm commented on code in PR #7695:
URL: https://github.com/apache/trafficcontrol/pull/7695#discussion_r1284853176
##########
traffic_control/clients/python/trafficops/tosession.py:
##########
@@ -2016,6 +2016,49 @@ def get_server_update_status(self, server_name=None):
:rtype: Tuple[Dict[str, Any], requests.Response]
:raises: Union[LoginError, OperationError]
"""
+
+ #
+ # Service categories
+ #
+ @api_request('get', 'service_categories', ('3.0', '4.0', '4.1', '5.0'))
+ def get_service_categories(self, query_params=None):
+ """
+ Get service categories.
+ :ref:`to-api-service_categories`
+ :rtype: Tuple[Union[Dict[str, Any], List[Dict[str, Any]]], requests.Response]
+ :raises: Union[LoginError, OperationError]
+ """
+
+
+ @api_request('post', 'service_categories', ('3.0', '4.0', '4.1', '5.0'))
+ def create_service_category(self, data=None):
+ """
+ Create a service category.
+ :param data: The update action. QueueUpdateRequest() can be used for this argument also.
+ :type data: Dict[str, Any]
+ :rtype: Tuple[Union[Dict[str, Any], List[Dict[str, Any]]], requests.Response]
+ :raises: Union[LoginError, OperationError]
+ """
+
+ @api_request('put', 'service_categories/{service_category_name:s}', ('4.0', '4.1', '5.0'))
Review Comment:
Added
--
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: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org