xautomata-hive 3.15.2__py3-none-any.whl → 3.15.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.
hive/api.py CHANGED
@@ -50,6 +50,7 @@ class ApiManager:
50
50
  _timeout_retry = 1 # di default non si fanno retry sui timeout
51
51
  _timeout_sleep_time = 120 # tempo di attesa tra un retry e quello successivo in caso di timeout
52
52
  _silence_warning = False # da implementare
53
+ _SSL_verify = True
53
54
 
54
55
  def __init__(self, root, user, password):
55
56
 
@@ -69,14 +70,14 @@ class ApiManager:
69
70
  """
70
71
  user, password = self.credentials
71
72
  auth_date = {"grant_type": "password", "username": user, "password": password}
72
- response = get_session(self._timeout, self._timeout_get_session_retry, self._timeout_get_session_backoff_factor).post(f'{self.root}/login/access-token', auth_date)
73
+ response = get_session(self._timeout, self._timeout_get_session_retry, self._timeout_get_session_backoff_factor).post(f'{self.root}/login/access-token', auth_date, verify=self._SSL_verify)
73
74
  response.raise_for_status()
74
75
  self.token = json.loads(response.content.decode('utf-8'))['access_token']
75
76
 
76
77
  def openapi(self):
77
78
  """metodo che restituisce gli schema degli end point"""
78
79
  response = get_session(self._timeout, self._timeout_get_session_retry, self._timeout_get_session_backoff_factor).request('GET', url=f'{self.root}/openapi.js',
79
- headers={'Authorization': f'Bearer {self.token}'})
80
+ headers={'Authorization': f'Bearer {self.token}'}, verify=self._SSL_verify)
80
81
  data = json.loads(response.content[15:].decode('utf-8'))
81
82
  return data
82
83
 
@@ -156,7 +157,7 @@ class ApiManager:
156
157
  @timeout_retry(max_tries=self._timeout_retry, sleep_time=self._timeout_sleep_time)
157
158
  @ratelimiter
158
159
  def run_request(_mode, _url, _headers, _payload, _params, **_kwargs):
159
- response = get_session(self._timeout, self._timeout_get_session_retry, self._timeout_get_session_backoff_factor).request(_mode, url=_url, json=_payload, params=_params, headers=_headers, **_kwargs)
160
+ response = get_session(self._timeout, self._timeout_get_session_retry, self._timeout_get_session_backoff_factor).request(_mode, url=_url, json=_payload, params=_params, headers=_headers, verify=self._SSL_verify, **_kwargs)
160
161
  if response.status_code == 401: raise UnauthorizedException
161
162
  if response.status_code != 200 and response.status_code != 504: # 504 non e' gestito dalle API per cui la responce non sarebbe json serializable
162
163
  print()
hive/version.py CHANGED
@@ -1 +1 @@
1
- version = '3.15.2'
1
+ version = '3.15.3'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xautomata-hive
3
- Version: 3.15.2
3
+ Version: 3.15.3
4
4
  Home-page: https://github.com/sherlogic/xautomata-hive.git
5
5
  Author: Enrico Ferro - Andrea Jacassi
6
6
  Author-email:
@@ -1,9 +1,9 @@
1
1
  hive/__init__.py,sha256=UjH5QfSfRGu2FR5_StfVbEtL_fuGS2Z_iZXmf1nx4AE,68
2
- hive/api.py,sha256=LORd3pbmBDOc62ssA4wQLu-Fld4yGZJu8fz3iSb35tI,40224
2
+ hive/api.py,sha256=Q6l0MlNh1Gp8WQaAtk_brPg0uymT4l-3LwbRwtV2HT0,40322
3
3
  hive/decorators.py,sha256=tId1zEXXKgegU_F9g2nbjFosB-9NNWQWueMu60w60Cc,9947
4
4
  hive/exceptions.py,sha256=kTJSPMViU2ZhF_ENbL_i-skU3YEv_ViJH2PpUQ6ums8,136
5
5
  hive/infrastrucure_keys.py,sha256=wFUWGY3Ct9OdiQMRtF7ZlzwtctNwq2eEGt-o0Lqmn10,3688
6
- hive/version.py,sha256=gkJ5x0kD2RW7u30WB3dE7xxTwL740g6Ph30O-gTlOIY,18
6
+ hive/version.py,sha256=7gVst0HbHiY3wEfVWQLBh8h1C-uuGsKWkRILO-Ndu80,18
7
7
  hive/cookbook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  hive/cookbook/acl_docs.py,sha256=0xr7Vb9121vhsiZjQaKvuAt4gKlXOO4aUJM472HeARw,786
9
9
  hive/cookbook/acl_overrides.py,sha256=l3xyJmGeQysP1M2Sa6kVhDn8n6ttCKUzJ0jTcPjyo78,9690
@@ -59,8 +59,8 @@ hive/cookbook/virtual_domains.py,sha256=-i666Jyi3j_EwRUzlymh2-q3bCxAz6TA3Q_lPVDC
59
59
  hive/cookbook/webhooks.py,sha256=xQp7gW4FQP6717d4MCOuQN2Py7nw7TFy4pl9RmkqMKs,6705
60
60
  hive/cookbook/widget_groups.py,sha256=Sd8u_eNr7GYLyN0-wC-k9lsHfNOEmU3HkAvWrwWoZtE,15917
61
61
  hive/cookbook/widgets.py,sha256=d7-DXC-ODNpdt4KjCAzFW0T3HWf0ThOO9yL17jJigdc,23396
62
- xautomata_hive-3.15.2.dist-info/LICENSE,sha256=CFT1oIPm4kciOjwep2r1LQnpATugddSy3D839fsmgFs,1065
63
- xautomata_hive-3.15.2.dist-info/METADATA,sha256=QyvYcrSLb1A9VO3LoQ4EOJSYY71BNdRvG34mC1KTkPI,10752
64
- xautomata_hive-3.15.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
65
- xautomata_hive-3.15.2.dist-info/top_level.txt,sha256=pLpVAuviHGk3pzaFXU-4GKttxGTGAbFoWK8JvUl1jHQ,5
66
- xautomata_hive-3.15.2.dist-info/RECORD,,
62
+ xautomata_hive-3.15.3.dist-info/LICENSE,sha256=CFT1oIPm4kciOjwep2r1LQnpATugddSy3D839fsmgFs,1065
63
+ xautomata_hive-3.15.3.dist-info/METADATA,sha256=Lkgi5dDUE2GA9KDNG5E68dsP-r7M7kLFULEe-Ql4OwY,10752
64
+ xautomata_hive-3.15.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
65
+ xautomata_hive-3.15.3.dist-info/top_level.txt,sha256=pLpVAuviHGk3pzaFXU-4GKttxGTGAbFoWK8JvUl1jHQ,5
66
+ xautomata_hive-3.15.3.dist-info/RECORD,,