oc-cdtapi 3.30.4__py3-none-any.whl → 3.32.1__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/API.py CHANGED
@@ -3,6 +3,7 @@ import doctest
3
3
  import os
4
4
  import shutil # this required to copy data between file objects
5
5
  import posixpath
6
+ import urllib3
6
7
 
7
8
  import requests
8
9
 
@@ -83,6 +84,14 @@ class HttpAPI(object):
83
84
 
84
85
  self.root = root
85
86
  self.web = requests.Session()
87
+ adapter = requests.adapters.HTTPAdapter(max_retries=urllib3.Retry(
88
+ raise_on_status=False,
89
+ total=2,
90
+ status_forcelist=[401],
91
+ allowed_methods=["HEAD", "GET", "PUT", "DELETE", "OPTIONS", "POST"]
92
+ ))
93
+ self.web.mount("https://", adapter)
94
+ self.web.mount("http://", adapter)
86
95
 
87
96
  if user and not anonymous:
88
97
  self.web.auth = (user, auth)
oc_cdtapi/PgQAPI.py CHANGED
@@ -26,7 +26,7 @@ class PgQAPI (object):
26
26
  else:
27
27
  logging.debug('No connection provided, creating')
28
28
  self.conn = self.pg_connect(url, username, password)
29
- self.message_types = ['dlartifacts', 'dlbuild', 'dlcontents', 'dlupload', 'ns', 'register_file']
29
+ self.message_types = ['dlartifacts', 'dlbuild', 'dlcontents', 'dlupload', 'ns', 'register_file', 'register_checksum']
30
30
 
31
31
  def create_queue(self, queue_code, queue_name):
32
32
  logging.debug('reached create_queue')
@@ -69,6 +69,26 @@ class PgQAPI (object):
69
69
  logging.debug(message)
70
70
  return message
71
71
 
72
+ def compose_dlupload(self, parms):
73
+ logging.debug('reached compose_dlupload')
74
+ logging.debug('received parms: [%s]' % parms)
75
+ msg = ["upload_delivery", [parms], {}]
76
+ logging.debug('composed: [%s]' % msg)
77
+ return msg
78
+
79
+ def compose_register_checksum(self, parms):
80
+ logging.debug('reached compose_register_checksum')
81
+ logging.debug('received parms: [%s]' % parms)
82
+ file_loc = parms.get('file_loc')
83
+ checksum = parms.get('checksum')
84
+ citype = parms.get('citype')
85
+ mime = parms.get('mime')
86
+ if file_loc is None or checksum is None or citype is None:
87
+ logging.error('One of mandatory parms is missing: file_loc, checksum, citype')
88
+ return None
89
+ msg = ["register_checksum", [file_loc, checksum, {"citype":citype}, mime] ]
90
+ return msg
91
+
72
92
  def compose_register_file(self, parms):
73
93
  logging.debug('reached compose_register_file')
74
94
  logging.debug('received parms: [%s]' % parms)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oc-cdtapi
3
- Version: 3.30.4
3
+ Version: 3.32.1
4
4
  Summary: Custom Development python API libraries
5
5
  License: Apache2.0
6
6
  Requires-Python: >=3.6
@@ -1,4 +1,4 @@
1
- oc_cdtapi/API.py,sha256=hpdnzyirYT_wISeznRmoqr-umYRT6uqKVwhmCXyj8Nk,12398
1
+ oc_cdtapi/API.py,sha256=bgYcRU1PwI_FIRaOdfZZiLf98NofH_OBgW563WBYL4c,12758
2
2
  oc_cdtapi/Dbsm2API.py,sha256=WDBst1dCAmDVU9d9Ogzwp2nkjtKZ4thU2xG4sAPI_Nk,9963
3
3
  oc_cdtapi/DevPIAPI.py,sha256=9WND9ld66eHmC5qoLJq3KDYSoO-pP69UqOQsGZNLZYg,1835
4
4
  oc_cdtapi/DmsAPI.py,sha256=eNFdwQLhCbPvHB5SUtP4QcZZtSdjkgt_Cxn3oQ3iJ5s,15605
@@ -7,14 +7,14 @@ oc_cdtapi/ForemanAPI.py,sha256=0GsC9s9uGoYgMbsgBW5aDEGoGLGeRPJJSTAWhbelhVY,57135
7
7
  oc_cdtapi/JenkinsAPI.py,sha256=lZ8pe3a4eb_6h53JE7QLuzOSlu7Sqatc9PQwWhio9Vg,15748
8
8
  oc_cdtapi/NexusAPI.py,sha256=uU12GtHvKlWorFaPAnFcQ5AGEc94MZ5SdmfM2Pw3F7A,26122
9
9
  oc_cdtapi/PgAPI.py,sha256=URSz7qu-Ir7AOj0jI3ucTXn2PM-nC96nmPZI746OLjA,14356
10
- oc_cdtapi/PgQAPI.py,sha256=MJzzm9XGkrMQ8mjoM4WeS1KYAgLeCL73yga8kB-HoUk,9436
10
+ oc_cdtapi/PgQAPI.py,sha256=p2nDGrnU5juobumwq9QiVPxcsX6bHAtipUHBBxFrOeE,10312
11
11
  oc_cdtapi/RundeckAPI.py,sha256=O3LmcFaHSz8UqeUyIHTTEMJncDD191Utd-iZaeJay2s,24243
12
12
  oc_cdtapi/TestServer.py,sha256=HV97UWg2IK4gOYAp9yaMdwFUWsw9v66MxyZdI3qQctA,2715
13
13
  oc_cdtapi/VaultAPI.py,sha256=P-x_PsWe_S0mGUKTCmR1KhUjdfs7GmyaltjGQcnWj_s,2967
14
14
  oc_cdtapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- oc_cdtapi-3.30.4.data/scripts/nexus.py,sha256=4teqZ_KtCSrwHDJVgA7lkreteod4Xt5XJFZNbwb7E6E,6858
16
- oc_cdtapi-3.30.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
17
- oc_cdtapi-3.30.4.dist-info/METADATA,sha256=2nBugCQ690LJM8S2SmeowaDaJp8TpjC7rJ-zWtKEDI8,504
18
- oc_cdtapi-3.30.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- oc_cdtapi-3.30.4.dist-info/top_level.txt,sha256=d4-5-D-0CSeSXYuLCP7-nIFCpjkfmJr-Y_muzds8iVU,10
20
- oc_cdtapi-3.30.4.dist-info/RECORD,,
15
+ oc_cdtapi-3.32.1.data/scripts/nexus.py,sha256=4teqZ_KtCSrwHDJVgA7lkreteod4Xt5XJFZNbwb7E6E,6858
16
+ oc_cdtapi-3.32.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
17
+ oc_cdtapi-3.32.1.dist-info/METADATA,sha256=SGHrOyGV65c7BmTNp347uZwDmMjQY__IDyB46TMmhbo,504
18
+ oc_cdtapi-3.32.1.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
19
+ oc_cdtapi-3.32.1.dist-info/top_level.txt,sha256=d4-5-D-0CSeSXYuLCP7-nIFCpjkfmJr-Y_muzds8iVU,10
20
+ oc_cdtapi-3.32.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5