Fix/add use cases under SMO package
[it/dep.git] / smo-install / test / pythonsdk / src / oransdk / so / so.py
1 #!/usr/bin/env python3
2 ###
3 # ============LICENSE_START=======================================================
4 # ORAN SMO PACKAGE - PYTHONSDK TESTS
5 # ================================================================================
6 # Copyright (C) 2022 AT&T Intellectual Property. All rights
7 #                             reserved.
8 # ================================================================================
9 # Licensed under the Apache License, Version 2.0 (the "License");
10 # you may not use this file except in compliance with the License.
11 # You may obtain a copy of the License at
12 #
13 # http://www.apache.org/licenses/LICENSE-2.0
14 #
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 # See the License for the specific language governing permissions and
19 # limitations under the License.
20 # ============LICENSE_END============================================
21 # ===================================================================
22 #
23 ###
24 """Onap SO module."""
25 from onapsdk.so.so_element import SoElement
26
27 class OranSo(SoElement):
28     """So class."""
29
30     def healthcheck(self) -> dict:
31         """
32         Healthcheck SO main component.
33
34         Returns:
35            the status of SO components
36         """
37         status = self.send_message_json('GET',
38                                         'Get status of SO components',
39                                         f"{self.base_url}/manage/health",
40                                         headers=self.headers)
41         return status