oc-cdtapi 3.19.2__py3-none-any.whl → 3.19.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
oc_cdtapi/PgAPI.py CHANGED
@@ -11,6 +11,62 @@ class PostgresAPI(API.HttpAPI):
11
11
  def __init__(self, *args, **kwargs):
12
12
  super().__init__(*args, **kwargs)
13
13
 
14
+ def get_citypedms_by_citype_id(self, citype):
15
+ """
16
+ Retrieve citypedms information for a given CI type ID.
17
+
18
+ This method fetches a list of citypedms entries containing id, ci_type_id,
19
+ dms_id, and gav_template for the specified CI type ID.
20
+
21
+ Args:
22
+ citype (str): The CI type ID to query.
23
+
24
+ Returns:
25
+ dict: A dictionary containing citypedms information with the following keys:
26
+ - id: The citypedms entry ID
27
+ - ci_type_id: The CI type ID
28
+ - dms_id: The DMS ID
29
+ - gav_template: The GAV (Group:Artifact:Version) template
30
+
31
+ Example:
32
+ >>> citypedms = api.get_citypedms_by_citype_id("CI123")
33
+ >>> print(citypedms['id'])
34
+ 'CP456'
35
+ """
36
+ req = f"rest/api/1/citypedms/{citype}"
37
+ res = self.get(req).json()
38
+ logging.debug(f'Using get_citypedms_by_citype_id to get information about {citype}')
39
+
40
+ return res
41
+
42
+ def get_citypedms_by_dms_id(self, dms_id):
43
+ """
44
+ Retrieve citypedms information for a given DMS ID.
45
+
46
+ This method fetches a list of citypedms entries containing id, ci_type_id,
47
+ dms_id, and gav_template for the specified DMS ID (component ID).
48
+
49
+ Args:
50
+ dms_id (str): The DMS ID (component ID) to query.
51
+
52
+ Returns:
53
+ dict: A dictionary containing citypedms information with the following keys:
54
+ - id: The citypedms entry ID
55
+ - ci_type_id: The CI type ID
56
+ - dms_id: The DMS ID
57
+ - gav_template: The GAV (Group:Artifact:Version) template
58
+
59
+ Example:
60
+ >>> citypedms = api.get_citypedms_by_dms_id("DMS789")
61
+ >>> print(citypedms['gav_template'])
62
+ 'com.example:{artifact}:{version}'
63
+ """
64
+ req = f"rest/api/1/citypedms/{dms_id}?bycomponent=True"
65
+ res = self.get(req)
66
+ logging.debug(f'Using get_citypedms_by_dms_id to get information about {dms_id}')
67
+
68
+ return res.json()
69
+
14
70
  def get_ci_type_by_code(self, request):
15
71
  """
16
72
  Retrieve a list of ci type based on the provided ci type code.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oc-cdtapi
3
- Version: 3.19.2
3
+ Version: 3.19.3
4
4
  Summary: Custom Development python API libraries
5
5
  License: Apache2.0
6
6
  Requires-Python: >=3.6
@@ -6,14 +6,14 @@ oc_cdtapi/DmsGetverAPI.py,sha256=ZPU4HlF59fngKu5mSFhtss3rlBuduffDOSm_y3XWrxk,155
6
6
  oc_cdtapi/ForemanAPI.py,sha256=9r1MSOsubiSxM1sdzF2MHD7IcSwX9Y4UDJknHqQK07g,44255
7
7
  oc_cdtapi/JenkinsAPI.py,sha256=lZ8pe3a4eb_6h53JE7QLuzOSlu7Sqatc9PQwWhio9Vg,15748
8
8
  oc_cdtapi/NexusAPI.py,sha256=uU12GtHvKlWorFaPAnFcQ5AGEc94MZ5SdmfM2Pw3F7A,26122
9
- oc_cdtapi/PgAPI.py,sha256=Mm1wXrXGGY2MMnrF9HdFoxpZT7uMMyP3WnF8zyZcYlc,11194
9
+ oc_cdtapi/PgAPI.py,sha256=9VQBDHvXupOQEo06OjBjacVrCQJ5eNE29epabQXgIfU,13256
10
10
  oc_cdtapi/PgQAPI.py,sha256=ofcoS3J5CWN3EtwxW6EcuFUbNQH2BHAJkjrNSfwJ98o,8612
11
11
  oc_cdtapi/RundeckAPI.py,sha256=O3LmcFaHSz8UqeUyIHTTEMJncDD191Utd-iZaeJay2s,24243
12
12
  oc_cdtapi/TestServer.py,sha256=HV97UWg2IK4gOYAp9yaMdwFUWsw9v66MxyZdI3qQctA,2715
13
13
  oc_cdtapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- oc_cdtapi-3.19.2.data/scripts/nexus.py,sha256=4teqZ_KtCSrwHDJVgA7lkreteod4Xt5XJFZNbwb7E6E,6858
15
- oc_cdtapi-3.19.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
16
- oc_cdtapi-3.19.2.dist-info/METADATA,sha256=RD2npG_1I_X5lEl2k5nym2um12nl6rnqD-my3GDgLCs,484
17
- oc_cdtapi-3.19.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
18
- oc_cdtapi-3.19.2.dist-info/top_level.txt,sha256=d4-5-D-0CSeSXYuLCP7-nIFCpjkfmJr-Y_muzds8iVU,10
19
- oc_cdtapi-3.19.2.dist-info/RECORD,,
14
+ oc_cdtapi-3.19.3.data/scripts/nexus.py,sha256=4teqZ_KtCSrwHDJVgA7lkreteod4Xt5XJFZNbwb7E6E,6858
15
+ oc_cdtapi-3.19.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
16
+ oc_cdtapi-3.19.3.dist-info/METADATA,sha256=-QyiiGPr2WUm536lYuOBSMmJhamOcTBDvT60YRDeMz4,484
17
+ oc_cdtapi-3.19.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
18
+ oc_cdtapi-3.19.3.dist-info/top_level.txt,sha256=d4-5-D-0CSeSXYuLCP7-nIFCpjkfmJr-Y_muzds8iVU,10
19
+ oc_cdtapi-3.19.3.dist-info/RECORD,,