oc-cdtapi 3.19.4__py3-none-any.whl → 3.20.0__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 +34 -1
- {oc_cdtapi-3.19.4.dist-info → oc_cdtapi-3.20.0.dist-info}/METADATA +1 -1
- {oc_cdtapi-3.19.4.dist-info → oc_cdtapi-3.20.0.dist-info}/RECORD +7 -7
- {oc_cdtapi-3.19.4.data → oc_cdtapi-3.20.0.data}/scripts/nexus.py +0 -0
- {oc_cdtapi-3.19.4.dist-info → oc_cdtapi-3.20.0.dist-info}/WHEEL +0 -0
- {oc_cdtapi-3.19.4.dist-info → oc_cdtapi-3.20.0.dist-info}/licenses/LICENSE +0 -0
- {oc_cdtapi-3.19.4.dist-info → oc_cdtapi-3.20.0.dist-info}/top_level.txt +0 -0
oc_cdtapi/PgAPI.py
CHANGED
@@ -401,4 +401,37 @@ class PostgresAPI(API.HttpAPI):
|
|
401
401
|
req = f"rest/api/1/clients/{code}"
|
402
402
|
res = self.get(req)
|
403
403
|
|
404
|
-
return res.json()
|
404
|
+
return res.json()
|
405
|
+
|
406
|
+
def post_new_component(self, payload):
|
407
|
+
"""
|
408
|
+
Post new component to the ci database.
|
409
|
+
|
410
|
+
This method sends a POST request to add new component into ci database.
|
411
|
+
|
412
|
+
Args:
|
413
|
+
payload : New component payload.
|
414
|
+
|
415
|
+
Returns:
|
416
|
+
requests.Response: The response object from the API call.
|
417
|
+
|
418
|
+
Example:
|
419
|
+
>>> payload = {
|
420
|
+
"ci_type_id": "NEWDSTR",
|
421
|
+
"ci_type_group_id": "NEW",
|
422
|
+
"name": "New component",
|
423
|
+
"is_standard": "Y",
|
424
|
+
"is_deliverable": True,
|
425
|
+
"regexp": "test.regexp.NEWDSTR:dstr:com",
|
426
|
+
"loc_type_id": "NXS",
|
427
|
+
"dms_id": "NEWDSTR"
|
428
|
+
}
|
429
|
+
>>> result = self.post_new_component(payload)
|
430
|
+
>>> print(result.status_code)
|
431
|
+
200
|
432
|
+
"""
|
433
|
+
req = f"rest/api/1/manage_citype"
|
434
|
+
res = self.post(req, json=payload)
|
435
|
+
logging.debug(f'Using post_manage_citype to register new component')
|
436
|
+
|
437
|
+
return res
|
@@ -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=
|
9
|
+
oc_cdtapi/PgAPI.py,sha256=URSz7qu-Ir7AOj0jI3ucTXn2PM-nC96nmPZI746OLjA,14356
|
10
10
|
oc_cdtapi/PgQAPI.py,sha256=CUN3TSvyglglJ5EgzIt-iE7PX6atKKycoPMHyLkT6oA,8658
|
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.
|
15
|
-
oc_cdtapi-3.
|
16
|
-
oc_cdtapi-3.
|
17
|
-
oc_cdtapi-3.
|
18
|
-
oc_cdtapi-3.
|
19
|
-
oc_cdtapi-3.
|
14
|
+
oc_cdtapi-3.20.0.data/scripts/nexus.py,sha256=4teqZ_KtCSrwHDJVgA7lkreteod4Xt5XJFZNbwb7E6E,6858
|
15
|
+
oc_cdtapi-3.20.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
16
|
+
oc_cdtapi-3.20.0.dist-info/METADATA,sha256=vqmC6tuhx_8u9q1Z6Yal31uLdmKewZva6v0-ABgnrQk,484
|
17
|
+
oc_cdtapi-3.20.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
18
|
+
oc_cdtapi-3.20.0.dist-info/top_level.txt,sha256=d4-5-D-0CSeSXYuLCP7-nIFCpjkfmJr-Y_muzds8iVU,10
|
19
|
+
oc_cdtapi-3.20.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|