catocli 2.0.5__py3-none-any.whl → 2.1.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.

Potentially problematic release.


This version of catocli might be problematic. Click here for more details.

Files changed (361) hide show
  1. catocli/Utils/clidriver.py +10 -0
  2. catocli/__init__.py +1 -1
  3. catocli/parsers/custom/export_sites/export_sites.py +18 -1
  4. catocli/parsers/custom/import_sites_to_tf/__init__.py +3 -1
  5. catocli/parsers/custom/import_sites_to_tf/import_sites_to_tf.py +71 -5
  6. catocli/parsers/mutation_accountManagement/__init__.py +13 -0
  7. catocli/parsers/mutation_accountManagement_disableAccount/README.md +16 -0
  8. catocli/parsers/mutation_groups/README.md +7 -0
  9. catocli/parsers/mutation_groups/__init__.py +48 -0
  10. catocli/parsers/mutation_groups_createGroup/README.md +18 -0
  11. catocli/parsers/mutation_groups_deleteGroup/README.md +18 -0
  12. catocli/parsers/mutation_groups_updateGroup/README.md +18 -0
  13. catocli/parsers/mutation_site/__init__.py +104 -0
  14. catocli/parsers/mutation_site_assignSiteBwLicense/README.md +17 -0
  15. catocli/parsers/mutation_site_removeSecondaryAwsVSocket/README.md +17 -0
  16. catocli/parsers/mutation_site_removeSecondaryAzureVSocket/README.md +17 -0
  17. catocli/parsers/mutation_site_removeSiteBwLicense/README.md +17 -0
  18. catocli/parsers/mutation_site_replaceSiteBwLicense/README.md +17 -0
  19. catocli/parsers/mutation_site_updateSecondaryAwsVSocket/README.md +17 -0
  20. catocli/parsers/mutation_site_updateSecondaryAzureVSocket/README.md +17 -0
  21. catocli/parsers/mutation_site_updateSiteBwLicense/README.md +17 -0
  22. catocli/parsers/mutation_site_updateSiteGeneralDetails/README.md +1 -1
  23. catocli/parsers/mutation_sites/__init__.py +104 -0
  24. catocli/parsers/mutation_sites_assignSiteBwLicense/README.md +17 -0
  25. catocli/parsers/mutation_sites_removeSecondaryAwsVSocket/README.md +17 -0
  26. catocli/parsers/mutation_sites_removeSecondaryAzureVSocket/README.md +17 -0
  27. catocli/parsers/mutation_sites_removeSiteBwLicense/README.md +17 -0
  28. catocli/parsers/mutation_sites_replaceSiteBwLicense/README.md +17 -0
  29. catocli/parsers/mutation_sites_updateSecondaryAwsVSocket/README.md +17 -0
  30. catocli/parsers/mutation_sites_updateSecondaryAzureVSocket/README.md +17 -0
  31. catocli/parsers/mutation_sites_updateSiteBwLicense/README.md +17 -0
  32. catocli/parsers/mutation_sites_updateSiteGeneralDetails/README.md +1 -1
  33. catocli/parsers/parserApiClient.py +17 -8
  34. catocli/parsers/query_eventsFeed/README.md +1 -1
  35. catocli/parsers/query_groups/README.md +7 -0
  36. catocli/parsers/query_groups/__init__.py +54 -0
  37. catocli/parsers/query_groups_group/README.md +7 -0
  38. catocli/parsers/query_groups_groupList/README.md +18 -0
  39. catocli/parsers/query_groups_group_members/README.md +18 -0
  40. catocli/parsers/query_groups_whereUsed/README.md +17 -0
  41. catocli/parsers/query_popLocations/README.md +17 -0
  42. catocli/parsers/query_popLocations/__init__.py +16 -0
  43. catocli/parsers/query_site/__init__.py +26 -0
  44. catocli/parsers/query_site_secondaryAwsVSocket/README.md +17 -0
  45. catocli/parsers/query_site_secondaryAzureVSocket/README.md +17 -0
  46. catocli/parsers/query_socketPortMetrics/README.md +23 -0
  47. catocli/parsers/query_socketPortMetrics/__init__.py +16 -0
  48. catocli/parsers/query_socketPortMetricsTimeSeries/README.md +24 -0
  49. catocli/parsers/query_socketPortMetricsTimeSeries/__init__.py +16 -0
  50. {catocli-2.0.5.dist-info → catocli-2.1.0.dist-info}/METADATA +3 -2
  51. {catocli-2.0.5.dist-info → catocli-2.1.0.dist-info}/RECORD +249 -297
  52. {catocli-2.0.5.dist-info → catocli-2.1.0.dist-info}/WHEEL +1 -1
  53. {catocli-2.0.5.dist-info → catocli-2.1.0.dist-info}/top_level.txt +0 -2
  54. models/mutation.accountManagement.addAccount.json +97 -0
  55. models/mutation.accountManagement.disableAccount.json +545 -0
  56. models/mutation.accountManagement.removeAccount.json +102 -3
  57. models/mutation.accountManagement.updateAccount.json +97 -0
  58. models/mutation.admin.addAdmin.json +6 -9
  59. models/mutation.container.delete.json +2 -2
  60. models/mutation.container.fqdn.addValues.json +3 -3
  61. models/mutation.container.fqdn.createFromFile.json +3 -3
  62. models/mutation.container.fqdn.removeValues.json +3 -3
  63. models/mutation.container.fqdn.updateFromFile.json +3 -3
  64. models/mutation.container.ipAddressRange.addValues.json +3 -3
  65. models/mutation.container.ipAddressRange.createFromFile.json +3 -3
  66. models/mutation.container.ipAddressRange.removeValues.json +3 -3
  67. models/mutation.container.ipAddressRange.updateFromFile.json +3 -3
  68. models/mutation.groups.createGroup.json +3178 -0
  69. models/mutation.groups.deleteGroup.json +2758 -0
  70. models/mutation.groups.updateGroup.json +4429 -0
  71. models/mutation.hardware.updateHardwareShipping.json +30 -10
  72. models/mutation.policy.appTenantRestriction.addRule.json +33 -33
  73. models/mutation.policy.appTenantRestriction.addSection.json +4 -4
  74. models/mutation.policy.appTenantRestriction.createPolicyRevision.json +33 -33
  75. models/mutation.policy.appTenantRestriction.discardPolicyRevision.json +33 -33
  76. models/mutation.policy.appTenantRestriction.moveRule.json +27 -27
  77. models/mutation.policy.appTenantRestriction.moveSection.json +4 -4
  78. models/mutation.policy.appTenantRestriction.publishPolicyRevision.json +33 -33
  79. models/mutation.policy.appTenantRestriction.removeRule.json +27 -27
  80. models/mutation.policy.appTenantRestriction.removeSection.json +4 -4
  81. models/mutation.policy.appTenantRestriction.updatePolicy.json +33 -33
  82. models/mutation.policy.appTenantRestriction.updateRule.json +33 -33
  83. models/mutation.policy.appTenantRestriction.updateSection.json +4 -4
  84. models/mutation.policy.dynamicIpAllocation.addRule.json +12 -12
  85. models/mutation.policy.dynamicIpAllocation.addSection.json +4 -4
  86. models/mutation.policy.dynamicIpAllocation.createPolicyRevision.json +18 -18
  87. models/mutation.policy.dynamicIpAllocation.discardPolicyRevision.json +18 -18
  88. models/mutation.policy.dynamicIpAllocation.moveRule.json +12 -12
  89. models/mutation.policy.dynamicIpAllocation.moveSection.json +4 -4
  90. models/mutation.policy.dynamicIpAllocation.publishPolicyRevision.json +18 -18
  91. models/mutation.policy.dynamicIpAllocation.removeRule.json +12 -12
  92. models/mutation.policy.dynamicIpAllocation.removeSection.json +4 -4
  93. models/mutation.policy.dynamicIpAllocation.updatePolicy.json +18 -18
  94. models/mutation.policy.dynamicIpAllocation.updateRule.json +12 -12
  95. models/mutation.policy.dynamicIpAllocation.updateSection.json +4 -4
  96. models/mutation.policy.internetFirewall.addRule.json +141 -141
  97. models/mutation.policy.internetFirewall.addSection.json +4 -4
  98. models/mutation.policy.internetFirewall.createPolicyRevision.json +102 -102
  99. models/mutation.policy.internetFirewall.discardPolicyRevision.json +102 -102
  100. models/mutation.policy.internetFirewall.moveRule.json +96 -96
  101. models/mutation.policy.internetFirewall.moveSection.json +4 -4
  102. models/mutation.policy.internetFirewall.publishPolicyRevision.json +102 -102
  103. models/mutation.policy.internetFirewall.removeRule.json +96 -96
  104. models/mutation.policy.internetFirewall.removeSection.json +4 -4
  105. models/mutation.policy.internetFirewall.updatePolicy.json +102 -102
  106. models/mutation.policy.internetFirewall.updateRule.json +141 -141
  107. models/mutation.policy.internetFirewall.updateSection.json +4 -4
  108. models/mutation.policy.remotePortFwd.addRule.json +21 -21
  109. models/mutation.policy.remotePortFwd.addSection.json +4 -4
  110. models/mutation.policy.remotePortFwd.createPolicyRevision.json +24 -24
  111. models/mutation.policy.remotePortFwd.discardPolicyRevision.json +24 -24
  112. models/mutation.policy.remotePortFwd.moveRule.json +18 -18
  113. models/mutation.policy.remotePortFwd.moveSection.json +4 -4
  114. models/mutation.policy.remotePortFwd.publishPolicyRevision.json +24 -24
  115. models/mutation.policy.remotePortFwd.removeRule.json +18 -18
  116. models/mutation.policy.remotePortFwd.removeSection.json +4 -4
  117. models/mutation.policy.remotePortFwd.updatePolicy.json +24 -24
  118. models/mutation.policy.remotePortFwd.updateRule.json +21 -21
  119. models/mutation.policy.remotePortFwd.updateSection.json +4 -4
  120. models/mutation.policy.socketLan.addRule.json +97 -97
  121. models/mutation.policy.socketLan.addSection.json +4 -4
  122. models/mutation.policy.socketLan.createPolicyRevision.json +91 -91
  123. models/mutation.policy.socketLan.discardPolicyRevision.json +91 -91
  124. models/mutation.policy.socketLan.moveRule.json +85 -85
  125. models/mutation.policy.socketLan.moveSection.json +4 -4
  126. models/mutation.policy.socketLan.publishPolicyRevision.json +91 -91
  127. models/mutation.policy.socketLan.removeRule.json +85 -85
  128. models/mutation.policy.socketLan.removeSection.json +4 -4
  129. models/mutation.policy.socketLan.updatePolicy.json +91 -91
  130. models/mutation.policy.socketLan.updateRule.json +97 -97
  131. models/mutation.policy.socketLan.updateSection.json +4 -4
  132. models/mutation.policy.terminalServer.addRule.json +7 -7
  133. models/mutation.policy.terminalServer.addSection.json +4 -4
  134. models/mutation.policy.terminalServer.createPolicyRevision.json +13 -13
  135. models/mutation.policy.terminalServer.discardPolicyRevision.json +13 -13
  136. models/mutation.policy.terminalServer.moveRule.json +7 -7
  137. models/mutation.policy.terminalServer.moveSection.json +4 -4
  138. models/mutation.policy.terminalServer.publishPolicyRevision.json +13 -13
  139. models/mutation.policy.terminalServer.removeRule.json +7 -7
  140. models/mutation.policy.terminalServer.removeSection.json +4 -4
  141. models/mutation.policy.terminalServer.updatePolicy.json +13 -13
  142. models/mutation.policy.terminalServer.updateRule.json +7 -7
  143. models/mutation.policy.terminalServer.updateSection.json +4 -4
  144. models/mutation.policy.wanFirewall.addRule.json +157 -157
  145. models/mutation.policy.wanFirewall.addSection.json +4 -4
  146. models/mutation.policy.wanFirewall.createPolicyRevision.json +121 -121
  147. models/mutation.policy.wanFirewall.discardPolicyRevision.json +121 -121
  148. models/mutation.policy.wanFirewall.moveRule.json +115 -115
  149. models/mutation.policy.wanFirewall.moveSection.json +4 -4
  150. models/mutation.policy.wanFirewall.publishPolicyRevision.json +121 -121
  151. models/mutation.policy.wanFirewall.removeRule.json +115 -115
  152. models/mutation.policy.wanFirewall.removeSection.json +4 -4
  153. models/mutation.policy.wanFirewall.updatePolicy.json +121 -121
  154. models/mutation.policy.wanFirewall.updateRule.json +157 -157
  155. models/mutation.policy.wanFirewall.updateSection.json +4 -4
  156. models/mutation.policy.wanNetwork.addRule.json +103 -103
  157. models/mutation.policy.wanNetwork.addSection.json +4 -4
  158. models/mutation.policy.wanNetwork.createPolicyRevision.json +97 -97
  159. models/mutation.policy.wanNetwork.discardPolicyRevision.json +97 -97
  160. models/mutation.policy.wanNetwork.moveRule.json +91 -91
  161. models/mutation.policy.wanNetwork.moveSection.json +4 -4
  162. models/mutation.policy.wanNetwork.publishPolicyRevision.json +97 -97
  163. models/mutation.policy.wanNetwork.removeRule.json +91 -91
  164. models/mutation.policy.wanNetwork.removeSection.json +4 -4
  165. models/mutation.policy.wanNetwork.updatePolicy.json +97 -97
  166. models/mutation.policy.wanNetwork.updateRule.json +103 -103
  167. models/mutation.policy.wanNetwork.updateSection.json +4 -4
  168. models/mutation.site.addBgpPeer.json +10 -10
  169. models/mutation.site.addIpsecIkeV2SiteTunnels.json +2 -2
  170. models/mutation.site.addSocketAddOnCard.json +2 -2
  171. models/mutation.site.assignSiteBwLicense.json +12879 -0
  172. models/mutation.site.removeBgpPeer.json +10 -10
  173. models/mutation.site.removeIpsecIkeV2SiteTunnels.json +2 -2
  174. models/mutation.site.removeSecondaryAwsVSocket.json +375 -0
  175. models/mutation.site.removeSecondaryAzureVSocket.json +354 -0
  176. models/mutation.site.removeSiteBwLicense.json +12822 -0
  177. models/mutation.site.removeSocketAddOnCard.json +2 -2
  178. models/mutation.site.replaceSiteBwLicense.json +12939 -0
  179. models/mutation.site.startSiteUpgrade.json +36 -15
  180. models/mutation.site.updateBgpPeer.json +10 -10
  181. models/mutation.site.updateIpsecIkeV2SiteTunnels.json +2 -2
  182. models/mutation.site.updateSecondaryAwsVSocket.json +643 -0
  183. models/mutation.site.updateSecondaryAzureVSocket.json +565 -0
  184. models/mutation.site.updateSiteBwLicense.json +12882 -0
  185. models/mutation.site.updateSiteGeneralDetails.json +724 -1
  186. models/mutation.sites.addBgpPeer.json +10 -10
  187. models/mutation.sites.addIpsecIkeV2SiteTunnels.json +2 -2
  188. models/mutation.sites.addSocketAddOnCard.json +2 -2
  189. models/mutation.sites.assignSiteBwLicense.json +12879 -0
  190. models/mutation.sites.removeBgpPeer.json +10 -10
  191. models/mutation.sites.removeIpsecIkeV2SiteTunnels.json +2 -2
  192. models/mutation.sites.removeSecondaryAwsVSocket.json +375 -0
  193. models/mutation.sites.removeSecondaryAzureVSocket.json +354 -0
  194. models/mutation.sites.removeSiteBwLicense.json +12822 -0
  195. models/mutation.sites.removeSocketAddOnCard.json +2 -2
  196. models/mutation.sites.replaceSiteBwLicense.json +12939 -0
  197. models/mutation.sites.startSiteUpgrade.json +36 -15
  198. models/mutation.sites.updateBgpPeer.json +10 -10
  199. models/mutation.sites.updateIpsecIkeV2SiteTunnels.json +2 -2
  200. models/mutation.sites.updateSecondaryAwsVSocket.json +643 -0
  201. models/mutation.sites.updateSecondaryAzureVSocket.json +565 -0
  202. models/mutation.sites.updateSiteBwLicense.json +12882 -0
  203. models/mutation.sites.updateSiteGeneralDetails.json +724 -1
  204. models/mutation.xdr.addStoryComment.json +1 -1
  205. models/mutation.xdr.analystFeedback.json +84 -84
  206. models/mutation.xdr.deleteStoryComment.json +1 -1
  207. models/query.accountManagement.json +97 -0
  208. models/query.accountMetrics.json +45 -45
  209. models/query.accountSnapshot.json +30 -30
  210. models/query.admin.json +6 -6
  211. models/query.admins.json +13 -13
  212. models/query.appStats.json +915 -867
  213. models/query.appStatsTimeSeries.json +692 -656
  214. models/query.auditFeed.json +6 -6
  215. models/query.catalogs.json +52 -52
  216. models/query.container.json +16 -16
  217. models/query.devices.json +20 -93
  218. models/query.entityLookup.json +2 -2
  219. models/query.events.json +288 -384
  220. models/query.eventsFeed.json +73 -97
  221. models/query.eventsTimeSeries.json +219 -291
  222. models/query.groups.group.members.json +3058 -0
  223. models/query.groups.groupList.json +6474 -0
  224. models/query.groups.whereUsed.json +697 -0
  225. models/query.hardware.json +27 -7
  226. models/query.hardwareManagement.json +8 -8
  227. models/query.licensing.json +3487 -1324
  228. models/query.policy.appTenantRestriction.policy.json +32 -32
  229. models/query.policy.dynamicIpAllocation.policy.json +18 -18
  230. models/query.policy.internetFirewall.policy.json +93 -93
  231. models/query.policy.remotePortFwd.policy.json +23 -23
  232. models/query.policy.socketLan.policy.json +88 -88
  233. models/query.policy.terminalServer.policy.json +13 -13
  234. models/query.policy.wanFirewall.policy.json +111 -111
  235. models/query.policy.wanNetwork.policy.json +97 -97
  236. models/query.popLocations.json +2878 -0
  237. models/query.sandbox.json +5 -5
  238. models/query.site.bgpPeer.json +4 -4
  239. models/query.site.bgpPeerList.json +10 -10
  240. models/query.site.secondaryAwsVSocket.json +340 -0
  241. models/query.site.secondaryAzureVSocket.json +319 -0
  242. models/query.site.siteBgpStatus.json +2 -2
  243. models/query.socketPortMetrics.json +2410 -0
  244. models/query.socketPortMetricsTimeSeries.json +2361 -0
  245. models/query.xdr.stories.json +104 -104
  246. models/query.xdr.story.json +93 -93
  247. schema/catolib.py +21 -12
  248. build/lib/catocli/Utils/clidriver.py +0 -268
  249. build/lib/catocli/Utils/profile_manager.py +0 -188
  250. build/lib/catocli/Utils/version_checker.py +0 -192
  251. build/lib/catocli/__init__.py +0 -2
  252. build/lib/catocli/__main__.py +0 -12
  253. build/lib/catocli/parsers/configure/__init__.py +0 -115
  254. build/lib/catocli/parsers/configure/configure.py +0 -307
  255. build/lib/catocli/parsers/custom/__init__.py +0 -57
  256. build/lib/catocli/parsers/custom/customLib.py +0 -561
  257. build/lib/catocli/parsers/custom/export_rules/__init__.py +0 -42
  258. build/lib/catocli/parsers/custom/export_rules/export_rules.py +0 -234
  259. build/lib/catocli/parsers/custom/export_sites/__init__.py +0 -21
  260. build/lib/catocli/parsers/custom/export_sites/export_sites.py +0 -372
  261. build/lib/catocli/parsers/custom/import_rules_to_tf/__init__.py +0 -58
  262. build/lib/catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py +0 -451
  263. build/lib/catocli/parsers/custom/import_sites_to_tf/__init__.py +0 -45
  264. build/lib/catocli/parsers/custom/import_sites_to_tf/import_sites_to_tf.py +0 -891
  265. build/lib/catocli/parsers/mutation_accountManagement/__init__.py +0 -48
  266. build/lib/catocli/parsers/mutation_admin/__init__.py +0 -48
  267. build/lib/catocli/parsers/mutation_container/__init__.py +0 -138
  268. build/lib/catocli/parsers/mutation_hardware/__init__.py +0 -22
  269. build/lib/catocli/parsers/mutation_policy/__init__.py +0 -1305
  270. build/lib/catocli/parsers/mutation_sandbox/__init__.py +0 -35
  271. build/lib/catocli/parsers/mutation_site/__init__.py +0 -373
  272. build/lib/catocli/parsers/mutation_sites/__init__.py +0 -373
  273. build/lib/catocli/parsers/mutation_xdr/__init__.py +0 -48
  274. build/lib/catocli/parsers/parserApiClient.py +0 -513
  275. build/lib/catocli/parsers/query_accountBySubdomain/__init__.py +0 -16
  276. build/lib/catocli/parsers/query_accountManagement/__init__.py +0 -16
  277. build/lib/catocli/parsers/query_accountMetrics/__init__.py +0 -16
  278. build/lib/catocli/parsers/query_accountRoles/__init__.py +0 -16
  279. build/lib/catocli/parsers/query_accountSnapshot/__init__.py +0 -16
  280. build/lib/catocli/parsers/query_admin/__init__.py +0 -16
  281. build/lib/catocli/parsers/query_admins/__init__.py +0 -16
  282. build/lib/catocli/parsers/query_appStats/__init__.py +0 -16
  283. build/lib/catocli/parsers/query_appStatsTimeSeries/__init__.py +0 -16
  284. build/lib/catocli/parsers/query_auditFeed/__init__.py +0 -16
  285. build/lib/catocli/parsers/query_catalogs/__init__.py +0 -16
  286. build/lib/catocli/parsers/query_container/__init__.py +0 -16
  287. build/lib/catocli/parsers/query_devices/__init__.py +0 -16
  288. build/lib/catocli/parsers/query_entityLookup/__init__.py +0 -16
  289. build/lib/catocli/parsers/query_events/__init__.py +0 -16
  290. build/lib/catocli/parsers/query_eventsFeed/__init__.py +0 -16
  291. build/lib/catocli/parsers/query_eventsTimeSeries/__init__.py +0 -16
  292. build/lib/catocli/parsers/query_hardware/__init__.py +0 -16
  293. build/lib/catocli/parsers/query_hardwareManagement/__init__.py +0 -16
  294. build/lib/catocli/parsers/query_licensing/__init__.py +0 -16
  295. build/lib/catocli/parsers/query_policy/__init__.py +0 -161
  296. build/lib/catocli/parsers/query_sandbox/__init__.py +0 -16
  297. build/lib/catocli/parsers/query_site/__init__.py +0 -100
  298. build/lib/catocli/parsers/query_siteLocation/__init__.py +0 -13
  299. build/lib/catocli/parsers/query_subDomains/__init__.py +0 -16
  300. build/lib/catocli/parsers/query_xdr/__init__.py +0 -35
  301. build/lib/catocli/parsers/raw/__init__.py +0 -12
  302. build/lib/graphql_client/__init__.py +0 -11
  303. build/lib/graphql_client/api/__init__.py +0 -3
  304. build/lib/graphql_client/api/call_api.py +0 -84
  305. build/lib/graphql_client/api_client.py +0 -192
  306. build/lib/graphql_client/api_client_types.py +0 -409
  307. build/lib/graphql_client/configuration.py +0 -232
  308. build/lib/graphql_client/models/__init__.py +0 -13
  309. build/lib/graphql_client/models/no_schema.py +0 -71
  310. build/lib/schema/catolib.py +0 -1141
  311. build/lib/schema/importSchema.py +0 -60
  312. build/lib/schema/remove_policyid.py +0 -89
  313. build/lib/schema/remove_policyid_mutations.py +0 -89
  314. build/lib/scripts/catolib.py +0 -62
  315. build/lib/scripts/export_if_rules_to_json.py +0 -188
  316. build/lib/scripts/export_wf_rules_to_json.py +0 -111
  317. build/lib/scripts/import_wf_rules_to_tfstate.py +0 -331
  318. build/lib/vendor/certifi/__init__.py +0 -4
  319. build/lib/vendor/certifi/__main__.py +0 -12
  320. build/lib/vendor/certifi/core.py +0 -114
  321. build/lib/vendor/certifi/py.typed +0 -0
  322. build/lib/vendor/six.py +0 -998
  323. build/lib/vendor/urllib3/__init__.py +0 -211
  324. build/lib/vendor/urllib3/_base_connection.py +0 -172
  325. build/lib/vendor/urllib3/_collections.py +0 -483
  326. build/lib/vendor/urllib3/_request_methods.py +0 -278
  327. build/lib/vendor/urllib3/_version.py +0 -16
  328. build/lib/vendor/urllib3/connection.py +0 -1033
  329. build/lib/vendor/urllib3/connectionpool.py +0 -1182
  330. build/lib/vendor/urllib3/contrib/__init__.py +0 -0
  331. build/lib/vendor/urllib3/contrib/emscripten/__init__.py +0 -18
  332. build/lib/vendor/urllib3/contrib/emscripten/connection.py +0 -254
  333. build/lib/vendor/urllib3/contrib/emscripten/fetch.py +0 -418
  334. build/lib/vendor/urllib3/contrib/emscripten/request.py +0 -22
  335. build/lib/vendor/urllib3/contrib/emscripten/response.py +0 -285
  336. build/lib/vendor/urllib3/contrib/pyopenssl.py +0 -552
  337. build/lib/vendor/urllib3/contrib/socks.py +0 -228
  338. build/lib/vendor/urllib3/exceptions.py +0 -321
  339. build/lib/vendor/urllib3/fields.py +0 -341
  340. build/lib/vendor/urllib3/filepost.py +0 -89
  341. build/lib/vendor/urllib3/http2/__init__.py +0 -53
  342. build/lib/vendor/urllib3/http2/connection.py +0 -356
  343. build/lib/vendor/urllib3/http2/probe.py +0 -87
  344. build/lib/vendor/urllib3/poolmanager.py +0 -637
  345. build/lib/vendor/urllib3/py.typed +0 -2
  346. build/lib/vendor/urllib3/response.py +0 -1265
  347. build/lib/vendor/urllib3/util/__init__.py +0 -42
  348. build/lib/vendor/urllib3/util/connection.py +0 -137
  349. build/lib/vendor/urllib3/util/proxy.py +0 -43
  350. build/lib/vendor/urllib3/util/request.py +0 -256
  351. build/lib/vendor/urllib3/util/response.py +0 -101
  352. build/lib/vendor/urllib3/util/retry.py +0 -533
  353. build/lib/vendor/urllib3/util/ssl_.py +0 -513
  354. build/lib/vendor/urllib3/util/ssl_match_hostname.py +0 -159
  355. build/lib/vendor/urllib3/util/ssltransport.py +0 -276
  356. build/lib/vendor/urllib3/util/timeout.py +0 -275
  357. build/lib/vendor/urllib3/util/url.py +0 -471
  358. build/lib/vendor/urllib3/util/util.py +0 -42
  359. build/lib/vendor/urllib3/util/wait.py +0 -124
  360. {catocli-2.0.5.dist-info → catocli-2.1.0.dist-info}/entry_points.txt +0 -0
  361. {catocli-2.0.5.dist-info → catocli-2.1.0.dist-info/licenses}/LICENSE +0 -0
@@ -1,533 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import email
4
- import logging
5
- import random
6
- import re
7
- import time
8
- import typing
9
- from itertools import takewhile
10
- from types import TracebackType
11
-
12
- from ..exceptions import (
13
- ConnectTimeoutError,
14
- InvalidHeader,
15
- MaxRetryError,
16
- ProtocolError,
17
- ProxyError,
18
- ReadTimeoutError,
19
- ResponseError,
20
- )
21
- from .util import reraise
22
-
23
- if typing.TYPE_CHECKING:
24
- from typing_extensions import Self
25
-
26
- from ..connectionpool import ConnectionPool
27
- from ..response import BaseHTTPResponse
28
-
29
- log = logging.getLogger(__name__)
30
-
31
-
32
- # Data structure for representing the metadata of requests that result in a retry.
33
- class RequestHistory(typing.NamedTuple):
34
- method: str | None
35
- url: str | None
36
- error: Exception | None
37
- status: int | None
38
- redirect_location: str | None
39
-
40
-
41
- class Retry:
42
- """Retry configuration.
43
-
44
- Each retry attempt will create a new Retry object with updated values, so
45
- they can be safely reused.
46
-
47
- Retries can be defined as a default for a pool:
48
-
49
- .. code-block:: python
50
-
51
- retries = Retry(connect=5, read=2, redirect=5)
52
- http = PoolManager(retries=retries)
53
- response = http.request("GET", "https://example.com/")
54
-
55
- Or per-request (which overrides the default for the pool):
56
-
57
- .. code-block:: python
58
-
59
- response = http.request("GET", "https://example.com/", retries=Retry(10))
60
-
61
- Retries can be disabled by passing ``False``:
62
-
63
- .. code-block:: python
64
-
65
- response = http.request("GET", "https://example.com/", retries=False)
66
-
67
- Errors will be wrapped in :class:`~urllib3.exceptions.MaxRetryError` unless
68
- retries are disabled, in which case the causing exception will be raised.
69
-
70
- :param int total:
71
- Total number of retries to allow. Takes precedence over other counts.
72
-
73
- Set to ``None`` to remove this constraint and fall back on other
74
- counts.
75
-
76
- Set to ``0`` to fail on the first retry.
77
-
78
- Set to ``False`` to disable and imply ``raise_on_redirect=False``.
79
-
80
- :param int connect:
81
- How many connection-related errors to retry on.
82
-
83
- These are errors raised before the request is sent to the remote server,
84
- which we assume has not triggered the server to process the request.
85
-
86
- Set to ``0`` to fail on the first retry of this type.
87
-
88
- :param int read:
89
- How many times to retry on read errors.
90
-
91
- These errors are raised after the request was sent to the server, so the
92
- request may have side-effects.
93
-
94
- Set to ``0`` to fail on the first retry of this type.
95
-
96
- :param int redirect:
97
- How many redirects to perform. Limit this to avoid infinite redirect
98
- loops.
99
-
100
- A redirect is a HTTP response with a status code 301, 302, 303, 307 or
101
- 308.
102
-
103
- Set to ``0`` to fail on the first retry of this type.
104
-
105
- Set to ``False`` to disable and imply ``raise_on_redirect=False``.
106
-
107
- :param int status:
108
- How many times to retry on bad status codes.
109
-
110
- These are retries made on responses, where status code matches
111
- ``status_forcelist``.
112
-
113
- Set to ``0`` to fail on the first retry of this type.
114
-
115
- :param int other:
116
- How many times to retry on other errors.
117
-
118
- Other errors are errors that are not connect, read, redirect or status errors.
119
- These errors might be raised after the request was sent to the server, so the
120
- request might have side-effects.
121
-
122
- Set to ``0`` to fail on the first retry of this type.
123
-
124
- If ``total`` is not set, it's a good idea to set this to 0 to account
125
- for unexpected edge cases and avoid infinite retry loops.
126
-
127
- :param Collection allowed_methods:
128
- Set of uppercased HTTP method verbs that we should retry on.
129
-
130
- By default, we only retry on methods which are considered to be
131
- idempotent (multiple requests with the same parameters end with the
132
- same state). See :attr:`Retry.DEFAULT_ALLOWED_METHODS`.
133
-
134
- Set to a ``None`` value to retry on any verb.
135
-
136
- :param Collection status_forcelist:
137
- A set of integer HTTP status codes that we should force a retry on.
138
- A retry is initiated if the request method is in ``allowed_methods``
139
- and the response status code is in ``status_forcelist``.
140
-
141
- By default, this is disabled with ``None``.
142
-
143
- :param float backoff_factor:
144
- A backoff factor to apply between attempts after the second try
145
- (most errors are resolved immediately by a second try without a
146
- delay). urllib3 will sleep for::
147
-
148
- {backoff factor} * (2 ** ({number of previous retries}))
149
-
150
- seconds. If `backoff_jitter` is non-zero, this sleep is extended by::
151
-
152
- random.uniform(0, {backoff jitter})
153
-
154
- seconds. For example, if the backoff_factor is 0.1, then :func:`Retry.sleep` will
155
- sleep for [0.0s, 0.2s, 0.4s, 0.8s, ...] between retries. No backoff will ever
156
- be longer than `backoff_max`.
157
-
158
- By default, backoff is disabled (factor set to 0).
159
-
160
- :param bool raise_on_redirect: Whether, if the number of redirects is
161
- exhausted, to raise a MaxRetryError, or to return a response with a
162
- response code in the 3xx range.
163
-
164
- :param bool raise_on_status: Similar meaning to ``raise_on_redirect``:
165
- whether we should raise an exception, or return a response,
166
- if status falls in ``status_forcelist`` range and retries have
167
- been exhausted.
168
-
169
- :param tuple history: The history of the request encountered during
170
- each call to :meth:`~Retry.increment`. The list is in the order
171
- the requests occurred. Each list item is of class :class:`RequestHistory`.
172
-
173
- :param bool respect_retry_after_header:
174
- Whether to respect Retry-After header on status codes defined as
175
- :attr:`Retry.RETRY_AFTER_STATUS_CODES` or not.
176
-
177
- :param Collection remove_headers_on_redirect:
178
- Sequence of headers to remove from the request when a response
179
- indicating a redirect is returned before firing off the redirected
180
- request.
181
- """
182
-
183
- #: Default methods to be used for ``allowed_methods``
184
- DEFAULT_ALLOWED_METHODS = frozenset(
185
- ["HEAD", "GET", "PUT", "DELETE", "OPTIONS", "TRACE"]
186
- )
187
-
188
- #: Default status codes to be used for ``status_forcelist``
189
- RETRY_AFTER_STATUS_CODES = frozenset([413, 429, 503])
190
-
191
- #: Default headers to be used for ``remove_headers_on_redirect``
192
- DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(
193
- ["Cookie", "Authorization", "Proxy-Authorization"]
194
- )
195
-
196
- #: Default maximum backoff time.
197
- DEFAULT_BACKOFF_MAX = 120
198
-
199
- # Backward compatibility; assigned outside of the class.
200
- DEFAULT: typing.ClassVar[Retry]
201
-
202
- def __init__(
203
- self,
204
- total: bool | int | None = 10,
205
- connect: int | None = None,
206
- read: int | None = None,
207
- redirect: bool | int | None = None,
208
- status: int | None = None,
209
- other: int | None = None,
210
- allowed_methods: typing.Collection[str] | None = DEFAULT_ALLOWED_METHODS,
211
- status_forcelist: typing.Collection[int] | None = None,
212
- backoff_factor: float = 0,
213
- backoff_max: float = DEFAULT_BACKOFF_MAX,
214
- raise_on_redirect: bool = True,
215
- raise_on_status: bool = True,
216
- history: tuple[RequestHistory, ...] | None = None,
217
- respect_retry_after_header: bool = True,
218
- remove_headers_on_redirect: typing.Collection[
219
- str
220
- ] = DEFAULT_REMOVE_HEADERS_ON_REDIRECT,
221
- backoff_jitter: float = 0.0,
222
- ) -> None:
223
- self.total = total
224
- self.connect = connect
225
- self.read = read
226
- self.status = status
227
- self.other = other
228
-
229
- if redirect is False or total is False:
230
- redirect = 0
231
- raise_on_redirect = False
232
-
233
- self.redirect = redirect
234
- self.status_forcelist = status_forcelist or set()
235
- self.allowed_methods = allowed_methods
236
- self.backoff_factor = backoff_factor
237
- self.backoff_max = backoff_max
238
- self.raise_on_redirect = raise_on_redirect
239
- self.raise_on_status = raise_on_status
240
- self.history = history or ()
241
- self.respect_retry_after_header = respect_retry_after_header
242
- self.remove_headers_on_redirect = frozenset(
243
- h.lower() for h in remove_headers_on_redirect
244
- )
245
- self.backoff_jitter = backoff_jitter
246
-
247
- def new(self, **kw: typing.Any) -> Self:
248
- params = dict(
249
- total=self.total,
250
- connect=self.connect,
251
- read=self.read,
252
- redirect=self.redirect,
253
- status=self.status,
254
- other=self.other,
255
- allowed_methods=self.allowed_methods,
256
- status_forcelist=self.status_forcelist,
257
- backoff_factor=self.backoff_factor,
258
- backoff_max=self.backoff_max,
259
- raise_on_redirect=self.raise_on_redirect,
260
- raise_on_status=self.raise_on_status,
261
- history=self.history,
262
- remove_headers_on_redirect=self.remove_headers_on_redirect,
263
- respect_retry_after_header=self.respect_retry_after_header,
264
- backoff_jitter=self.backoff_jitter,
265
- )
266
-
267
- params.update(kw)
268
- return type(self)(**params) # type: ignore[arg-type]
269
-
270
- @classmethod
271
- def from_int(
272
- cls,
273
- retries: Retry | bool | int | None,
274
- redirect: bool | int | None = True,
275
- default: Retry | bool | int | None = None,
276
- ) -> Retry:
277
- """Backwards-compatibility for the old retries format."""
278
- if retries is None:
279
- retries = default if default is not None else cls.DEFAULT
280
-
281
- if isinstance(retries, Retry):
282
- return retries
283
-
284
- redirect = bool(redirect) and None
285
- new_retries = cls(retries, redirect=redirect)
286
- log.debug("Converted retries value: %r -> %r", retries, new_retries)
287
- return new_retries
288
-
289
- def get_backoff_time(self) -> float:
290
- """Formula for computing the current backoff
291
-
292
- :rtype: float
293
- """
294
- # We want to consider only the last consecutive errors sequence (Ignore redirects).
295
- consecutive_errors_len = len(
296
- list(
297
- takewhile(lambda x: x.redirect_location is None, reversed(self.history))
298
- )
299
- )
300
- if consecutive_errors_len <= 1:
301
- return 0
302
-
303
- backoff_value = self.backoff_factor * (2 ** (consecutive_errors_len - 1))
304
- if self.backoff_jitter != 0.0:
305
- backoff_value += random.random() * self.backoff_jitter
306
- return float(max(0, min(self.backoff_max, backoff_value)))
307
-
308
- def parse_retry_after(self, retry_after: str) -> float:
309
- seconds: float
310
- # Whitespace: https://tools.ietf.org/html/rfc7230#section-3.2.4
311
- if re.match(r"^\s*[0-9]+\s*$", retry_after):
312
- seconds = int(retry_after)
313
- else:
314
- retry_date_tuple = email.utils.parsedate_tz(retry_after)
315
- if retry_date_tuple is None:
316
- raise InvalidHeader(f"Invalid Retry-After header: {retry_after}")
317
-
318
- retry_date = email.utils.mktime_tz(retry_date_tuple)
319
- seconds = retry_date - time.time()
320
-
321
- seconds = max(seconds, 0)
322
-
323
- return seconds
324
-
325
- def get_retry_after(self, response: BaseHTTPResponse) -> float | None:
326
- """Get the value of Retry-After in seconds."""
327
-
328
- retry_after = response.headers.get("Retry-After")
329
-
330
- if retry_after is None:
331
- return None
332
-
333
- return self.parse_retry_after(retry_after)
334
-
335
- def sleep_for_retry(self, response: BaseHTTPResponse) -> bool:
336
- retry_after = self.get_retry_after(response)
337
- if retry_after:
338
- time.sleep(retry_after)
339
- return True
340
-
341
- return False
342
-
343
- def _sleep_backoff(self) -> None:
344
- backoff = self.get_backoff_time()
345
- if backoff <= 0:
346
- return
347
- time.sleep(backoff)
348
-
349
- def sleep(self, response: BaseHTTPResponse | None = None) -> None:
350
- """Sleep between retry attempts.
351
-
352
- This method will respect a server's ``Retry-After`` response header
353
- and sleep the duration of the time requested. If that is not present, it
354
- will use an exponential backoff. By default, the backoff factor is 0 and
355
- this method will return immediately.
356
- """
357
-
358
- if self.respect_retry_after_header and response:
359
- slept = self.sleep_for_retry(response)
360
- if slept:
361
- return
362
-
363
- self._sleep_backoff()
364
-
365
- def _is_connection_error(self, err: Exception) -> bool:
366
- """Errors when we're fairly sure that the server did not receive the
367
- request, so it should be safe to retry.
368
- """
369
- if isinstance(err, ProxyError):
370
- err = err.original_error
371
- return isinstance(err, ConnectTimeoutError)
372
-
373
- def _is_read_error(self, err: Exception) -> bool:
374
- """Errors that occur after the request has been started, so we should
375
- assume that the server began processing it.
376
- """
377
- return isinstance(err, (ReadTimeoutError, ProtocolError))
378
-
379
- def _is_method_retryable(self, method: str) -> bool:
380
- """Checks if a given HTTP method should be retried upon, depending if
381
- it is included in the allowed_methods
382
- """
383
- if self.allowed_methods and method.upper() not in self.allowed_methods:
384
- return False
385
- return True
386
-
387
- def is_retry(
388
- self, method: str, status_code: int, has_retry_after: bool = False
389
- ) -> bool:
390
- """Is this method/status code retryable? (Based on allowlists and control
391
- variables such as the number of total retries to allow, whether to
392
- respect the Retry-After header, whether this header is present, and
393
- whether the returned status code is on the list of status codes to
394
- be retried upon on the presence of the aforementioned header)
395
- """
396
- if not self._is_method_retryable(method):
397
- return False
398
-
399
- if self.status_forcelist and status_code in self.status_forcelist:
400
- return True
401
-
402
- return bool(
403
- self.total
404
- and self.respect_retry_after_header
405
- and has_retry_after
406
- and (status_code in self.RETRY_AFTER_STATUS_CODES)
407
- )
408
-
409
- def is_exhausted(self) -> bool:
410
- """Are we out of retries?"""
411
- retry_counts = [
412
- x
413
- for x in (
414
- self.total,
415
- self.connect,
416
- self.read,
417
- self.redirect,
418
- self.status,
419
- self.other,
420
- )
421
- if x
422
- ]
423
- if not retry_counts:
424
- return False
425
-
426
- return min(retry_counts) < 0
427
-
428
- def increment(
429
- self,
430
- method: str | None = None,
431
- url: str | None = None,
432
- response: BaseHTTPResponse | None = None,
433
- error: Exception | None = None,
434
- _pool: ConnectionPool | None = None,
435
- _stacktrace: TracebackType | None = None,
436
- ) -> Self:
437
- """Return a new Retry object with incremented retry counters.
438
-
439
- :param response: A response object, or None, if the server did not
440
- return a response.
441
- :type response: :class:`~urllib3.response.BaseHTTPResponse`
442
- :param Exception error: An error encountered during the request, or
443
- None if the response was received successfully.
444
-
445
- :return: A new ``Retry`` object.
446
- """
447
- if self.total is False and error:
448
- # Disabled, indicate to re-raise the error.
449
- raise reraise(type(error), error, _stacktrace)
450
-
451
- total = self.total
452
- if total is not None:
453
- total -= 1
454
-
455
- connect = self.connect
456
- read = self.read
457
- redirect = self.redirect
458
- status_count = self.status
459
- other = self.other
460
- cause = "unknown"
461
- status = None
462
- redirect_location = None
463
-
464
- if error and self._is_connection_error(error):
465
- # Connect retry?
466
- if connect is False:
467
- raise reraise(type(error), error, _stacktrace)
468
- elif connect is not None:
469
- connect -= 1
470
-
471
- elif error and self._is_read_error(error):
472
- # Read retry?
473
- if read is False or method is None or not self._is_method_retryable(method):
474
- raise reraise(type(error), error, _stacktrace)
475
- elif read is not None:
476
- read -= 1
477
-
478
- elif error:
479
- # Other retry?
480
- if other is not None:
481
- other -= 1
482
-
483
- elif response and response.get_redirect_location():
484
- # Redirect retry?
485
- if redirect is not None:
486
- redirect -= 1
487
- cause = "too many redirects"
488
- response_redirect_location = response.get_redirect_location()
489
- if response_redirect_location:
490
- redirect_location = response_redirect_location
491
- status = response.status
492
-
493
- else:
494
- # Incrementing because of a server error like a 500 in
495
- # status_forcelist and the given method is in the allowed_methods
496
- cause = ResponseError.GENERIC_ERROR
497
- if response and response.status:
498
- if status_count is not None:
499
- status_count -= 1
500
- cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status)
501
- status = response.status
502
-
503
- history = self.history + (
504
- RequestHistory(method, url, error, status, redirect_location),
505
- )
506
-
507
- new_retry = self.new(
508
- total=total,
509
- connect=connect,
510
- read=read,
511
- redirect=redirect,
512
- status=status_count,
513
- other=other,
514
- history=history,
515
- )
516
-
517
- if new_retry.is_exhausted():
518
- reason = error or ResponseError(cause)
519
- raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
520
-
521
- log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)
522
-
523
- return new_retry
524
-
525
- def __repr__(self) -> str:
526
- return (
527
- f"{type(self).__name__}(total={self.total}, connect={self.connect}, "
528
- f"read={self.read}, redirect={self.redirect}, status={self.status})"
529
- )
530
-
531
-
532
- # For backwards compatibility (equivalent to pre-v1.9):
533
- Retry.DEFAULT = Retry(3)