pulp_rpm_client 3.13.2 → 3.13.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (280) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/lib/pulp_rpm_client/api_client.rb +4 -2
  4. data/lib/pulp_rpm_client/configuration.rb +7 -0
  5. data/lib/pulp_rpm_client/version.rb +1 -1
  6. metadata +65 -339
  7. data/build/lib/pulpcore/__init__.py +0 -2
  8. data/build/lib/pulpcore/client/__init__.py +0 -2
  9. data/build/lib/pulpcore/client/pulp_rpm/__init__.py +0 -112
  10. data/build/lib/pulpcore/client/pulp_rpm/api/__init__.py +0 -22
  11. data/build/lib/pulpcore/client/pulp_rpm/api/content_advisories_api.py +0 -485
  12. data/build/lib/pulpcore/client/pulp_rpm/api/content_distribution_trees_api.py +0 -307
  13. data/build/lib/pulpcore/client/pulp_rpm/api/content_modulemd_defaults_api.py +0 -494
  14. data/build/lib/pulpcore/client/pulp_rpm/api/content_modulemds_api.py +0 -533
  15. data/build/lib/pulpcore/client/pulp_rpm/api/content_packagecategories_api.py +0 -307
  16. data/build/lib/pulpcore/client/pulp_rpm/api/content_packageenvironments_api.py +0 -307
  17. data/build/lib/pulpcore/client/pulp_rpm/api/content_packagegroups_api.py +0 -307
  18. data/build/lib/pulpcore/client/pulp_rpm/api/content_packagelangpacks_api.py +0 -307
  19. data/build/lib/pulpcore/client/pulp_rpm/api/content_packages_api.py +0 -552
  20. data/build/lib/pulpcore/client/pulp_rpm/api/content_repo_metadata_files_api.py +0 -307
  21. data/build/lib/pulpcore/client/pulp_rpm/api/distributions_rpm_api.py +0 -830
  22. data/build/lib/pulpcore/client/pulp_rpm/api/publications_rpm_api.py +0 -566
  23. data/build/lib/pulpcore/client/pulp_rpm/api/remotes_rpm_api.py +0 -840
  24. data/build/lib/pulpcore/client/pulp_rpm/api/remotes_uln_api.py +0 -840
  25. data/build/lib/pulpcore/client/pulp_rpm/api/repositories_rpm_api.py +0 -1063
  26. data/build/lib/pulpcore/client/pulp_rpm/api/repositories_rpm_versions_api.py +0 -614
  27. data/build/lib/pulpcore/client/pulp_rpm/api/rpm_copy_api.py +0 -156
  28. data/build/lib/pulpcore/client/pulp_rpm/api_client.py +0 -667
  29. data/build/lib/pulpcore/client/pulp_rpm/configuration.py +0 -427
  30. data/build/lib/pulpcore/client/pulp_rpm/exceptions.py +0 -121
  31. data/build/lib/pulpcore/client/pulp_rpm/models/__init__.py +0 -81
  32. data/build/lib/pulpcore/client/pulp_rpm/models/addon_response.py +0 -240
  33. data/build/lib/pulpcore/client/pulp_rpm/models/artifact_response.py +0 -368
  34. data/build/lib/pulpcore/client/pulp_rpm/models/async_operation_response.py +0 -124
  35. data/build/lib/pulpcore/client/pulp_rpm/models/checksum_response.py +0 -153
  36. data/build/lib/pulpcore/client/pulp_rpm/models/content_summary.py +0 -176
  37. data/build/lib/pulpcore/client/pulp_rpm/models/content_summary_response.py +0 -176
  38. data/build/lib/pulpcore/client/pulp_rpm/models/copy.py +0 -152
  39. data/build/lib/pulpcore/client/pulp_rpm/models/image_response.py +0 -207
  40. data/build/lib/pulpcore/client/pulp_rpm/models/metadata_checksum_type_enum.py +0 -106
  41. data/build/lib/pulpcore/client/pulp_rpm/models/null_enum.py +0 -100
  42. data/build/lib/pulpcore/client/pulp_rpm/models/package_checksum_type_enum.py +0 -106
  43. data/build/lib/pulpcore/client/pulp_rpm/models/paginated_repository_version_response_list.py +0 -197
  44. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_distribution_tree_response_list.py +0 -197
  45. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_modulemd_defaults_response_list.py +0 -197
  46. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_modulemd_response_list.py +0 -197
  47. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_package_category_response_list.py +0 -197
  48. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_package_environment_response_list.py +0 -197
  49. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_package_group_response_list.py +0 -197
  50. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_package_langpacks_response_list.py +0 -197
  51. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_package_response_list.py +0 -197
  52. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_repo_metadata_file_response_list.py +0 -197
  53. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_rpm_distribution_response_list.py +0 -197
  54. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_rpm_publication_response_list.py +0 -197
  55. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_rpm_remote_response_list.py +0 -197
  56. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_rpm_repository_response_list.py +0 -197
  57. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_uln_remote_response_list.py +0 -197
  58. data/build/lib/pulpcore/client/pulp_rpm/models/paginatedrpm_update_record_response_list.py +0 -197
  59. data/build/lib/pulpcore/client/pulp_rpm/models/patchedrpm_rpm_distribution.py +0 -258
  60. data/build/lib/pulpcore/client/pulp_rpm/models/patchedrpm_rpm_remote.py +0 -682
  61. data/build/lib/pulpcore/client/pulp_rpm/models/patchedrpm_rpm_repository.py +0 -467
  62. data/build/lib/pulpcore/client/pulp_rpm/models/patchedrpm_uln_remote.py +0 -684
  63. data/build/lib/pulpcore/client/pulp_rpm/models/policy_enum.py +0 -102
  64. data/build/lib/pulpcore/client/pulp_rpm/models/repository_add_remove_content.py +0 -179
  65. data/build/lib/pulpcore/client/pulp_rpm/models/repository_version.py +0 -123
  66. data/build/lib/pulpcore/client/pulp_rpm/models/repository_version_response.py +0 -257
  67. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_distribution_tree_response.py +0 -621
  68. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_modulemd.py +0 -463
  69. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_modulemd_defaults.py +0 -295
  70. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_modulemd_defaults_response.py +0 -432
  71. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_modulemd_response.py +0 -600
  72. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_package.py +0 -208
  73. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_package_category_response.py +0 -373
  74. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_package_environment_response.py +0 -400
  75. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_package_group_response.py +0 -457
  76. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_package_langpacks_response.py +0 -203
  77. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_package_response.py +0 -1353
  78. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_repo_metadata_file_response.py +0 -461
  79. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_repository_sync_url.py +0 -207
  80. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_rpm_distribution.py +0 -260
  81. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_rpm_distribution_response.py +0 -342
  82. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_rpm_publication.py +0 -301
  83. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_rpm_publication_response.py +0 -355
  84. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_rpm_remote.py +0 -684
  85. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_rpm_remote_response.py +0 -631
  86. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_rpm_repository.py +0 -468
  87. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_rpm_repository_response.py +0 -574
  88. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_uln_remote.py +0 -688
  89. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_uln_remote_response.py +0 -689
  90. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_update_collection.py +0 -176
  91. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_update_collection_response.py +0 -204
  92. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_update_record.py +0 -151
  93. data/build/lib/pulpcore/client/pulp_rpm/models/rpm_update_record_response.py +0 -653
  94. data/build/lib/pulpcore/client/pulp_rpm/models/skip_types_enum.py +0 -100
  95. data/build/lib/pulpcore/client/pulp_rpm/models/variant_response.py +0 -375
  96. data/build/lib/pulpcore/client/pulp_rpm/rest.py +0 -292
  97. data/dist/pulp_rpm-client-3.13.2.tar.gz +0 -0
  98. data/dist/pulp_rpm_client-3.13.2-py3-none-any.whl +0 -0
  99. data/pulp_rpm_client.egg-info/PKG-INFO +0 -15
  100. data/pulp_rpm_client.egg-info/SOURCES.txt +0 -179
  101. data/pulp_rpm_client.egg-info/dependency_links.txt +0 -1
  102. data/pulp_rpm_client.egg-info/requires.txt +0 -4
  103. data/pulp_rpm_client.egg-info/top_level.txt +0 -1
  104. data/pulpcore/__init__.py +0 -2
  105. data/pulpcore/client/__init__.py +0 -2
  106. data/pulpcore/client/pulp_rpm/__init__.py +0 -112
  107. data/pulpcore/client/pulp_rpm/api/__init__.py +0 -22
  108. data/pulpcore/client/pulp_rpm/api/content_advisories_api.py +0 -485
  109. data/pulpcore/client/pulp_rpm/api/content_distribution_trees_api.py +0 -307
  110. data/pulpcore/client/pulp_rpm/api/content_modulemd_defaults_api.py +0 -494
  111. data/pulpcore/client/pulp_rpm/api/content_modulemds_api.py +0 -533
  112. data/pulpcore/client/pulp_rpm/api/content_packagecategories_api.py +0 -307
  113. data/pulpcore/client/pulp_rpm/api/content_packageenvironments_api.py +0 -307
  114. data/pulpcore/client/pulp_rpm/api/content_packagegroups_api.py +0 -307
  115. data/pulpcore/client/pulp_rpm/api/content_packagelangpacks_api.py +0 -307
  116. data/pulpcore/client/pulp_rpm/api/content_packages_api.py +0 -552
  117. data/pulpcore/client/pulp_rpm/api/content_repo_metadata_files_api.py +0 -307
  118. data/pulpcore/client/pulp_rpm/api/distributions_rpm_api.py +0 -830
  119. data/pulpcore/client/pulp_rpm/api/publications_rpm_api.py +0 -566
  120. data/pulpcore/client/pulp_rpm/api/remotes_rpm_api.py +0 -840
  121. data/pulpcore/client/pulp_rpm/api/remotes_uln_api.py +0 -840
  122. data/pulpcore/client/pulp_rpm/api/repositories_rpm_api.py +0 -1063
  123. data/pulpcore/client/pulp_rpm/api/repositories_rpm_versions_api.py +0 -614
  124. data/pulpcore/client/pulp_rpm/api/rpm_copy_api.py +0 -156
  125. data/pulpcore/client/pulp_rpm/api_client.py +0 -667
  126. data/pulpcore/client/pulp_rpm/configuration.py +0 -427
  127. data/pulpcore/client/pulp_rpm/exceptions.py +0 -121
  128. data/pulpcore/client/pulp_rpm/models/__init__.py +0 -81
  129. data/pulpcore/client/pulp_rpm/models/addon_response.py +0 -240
  130. data/pulpcore/client/pulp_rpm/models/artifact_response.py +0 -368
  131. data/pulpcore/client/pulp_rpm/models/async_operation_response.py +0 -124
  132. data/pulpcore/client/pulp_rpm/models/checksum_response.py +0 -153
  133. data/pulpcore/client/pulp_rpm/models/content_summary.py +0 -176
  134. data/pulpcore/client/pulp_rpm/models/content_summary_response.py +0 -176
  135. data/pulpcore/client/pulp_rpm/models/copy.py +0 -152
  136. data/pulpcore/client/pulp_rpm/models/image_response.py +0 -207
  137. data/pulpcore/client/pulp_rpm/models/metadata_checksum_type_enum.py +0 -106
  138. data/pulpcore/client/pulp_rpm/models/null_enum.py +0 -100
  139. data/pulpcore/client/pulp_rpm/models/package_checksum_type_enum.py +0 -106
  140. data/pulpcore/client/pulp_rpm/models/paginated_repository_version_response_list.py +0 -197
  141. data/pulpcore/client/pulp_rpm/models/paginatedrpm_distribution_tree_response_list.py +0 -197
  142. data/pulpcore/client/pulp_rpm/models/paginatedrpm_modulemd_defaults_response_list.py +0 -197
  143. data/pulpcore/client/pulp_rpm/models/paginatedrpm_modulemd_response_list.py +0 -197
  144. data/pulpcore/client/pulp_rpm/models/paginatedrpm_package_category_response_list.py +0 -197
  145. data/pulpcore/client/pulp_rpm/models/paginatedrpm_package_environment_response_list.py +0 -197
  146. data/pulpcore/client/pulp_rpm/models/paginatedrpm_package_group_response_list.py +0 -197
  147. data/pulpcore/client/pulp_rpm/models/paginatedrpm_package_langpacks_response_list.py +0 -197
  148. data/pulpcore/client/pulp_rpm/models/paginatedrpm_package_response_list.py +0 -197
  149. data/pulpcore/client/pulp_rpm/models/paginatedrpm_repo_metadata_file_response_list.py +0 -197
  150. data/pulpcore/client/pulp_rpm/models/paginatedrpm_rpm_distribution_response_list.py +0 -197
  151. data/pulpcore/client/pulp_rpm/models/paginatedrpm_rpm_publication_response_list.py +0 -197
  152. data/pulpcore/client/pulp_rpm/models/paginatedrpm_rpm_remote_response_list.py +0 -197
  153. data/pulpcore/client/pulp_rpm/models/paginatedrpm_rpm_repository_response_list.py +0 -197
  154. data/pulpcore/client/pulp_rpm/models/paginatedrpm_uln_remote_response_list.py +0 -197
  155. data/pulpcore/client/pulp_rpm/models/paginatedrpm_update_record_response_list.py +0 -197
  156. data/pulpcore/client/pulp_rpm/models/patchedrpm_rpm_distribution.py +0 -258
  157. data/pulpcore/client/pulp_rpm/models/patchedrpm_rpm_remote.py +0 -682
  158. data/pulpcore/client/pulp_rpm/models/patchedrpm_rpm_repository.py +0 -467
  159. data/pulpcore/client/pulp_rpm/models/patchedrpm_uln_remote.py +0 -684
  160. data/pulpcore/client/pulp_rpm/models/policy_enum.py +0 -102
  161. data/pulpcore/client/pulp_rpm/models/repository_add_remove_content.py +0 -179
  162. data/pulpcore/client/pulp_rpm/models/repository_version.py +0 -123
  163. data/pulpcore/client/pulp_rpm/models/repository_version_response.py +0 -257
  164. data/pulpcore/client/pulp_rpm/models/rpm_distribution_tree_response.py +0 -621
  165. data/pulpcore/client/pulp_rpm/models/rpm_modulemd.py +0 -463
  166. data/pulpcore/client/pulp_rpm/models/rpm_modulemd_defaults.py +0 -295
  167. data/pulpcore/client/pulp_rpm/models/rpm_modulemd_defaults_response.py +0 -432
  168. data/pulpcore/client/pulp_rpm/models/rpm_modulemd_response.py +0 -600
  169. data/pulpcore/client/pulp_rpm/models/rpm_package.py +0 -208
  170. data/pulpcore/client/pulp_rpm/models/rpm_package_category_response.py +0 -373
  171. data/pulpcore/client/pulp_rpm/models/rpm_package_environment_response.py +0 -400
  172. data/pulpcore/client/pulp_rpm/models/rpm_package_group_response.py +0 -457
  173. data/pulpcore/client/pulp_rpm/models/rpm_package_langpacks_response.py +0 -203
  174. data/pulpcore/client/pulp_rpm/models/rpm_package_response.py +0 -1353
  175. data/pulpcore/client/pulp_rpm/models/rpm_repo_metadata_file_response.py +0 -461
  176. data/pulpcore/client/pulp_rpm/models/rpm_repository_sync_url.py +0 -207
  177. data/pulpcore/client/pulp_rpm/models/rpm_rpm_distribution.py +0 -260
  178. data/pulpcore/client/pulp_rpm/models/rpm_rpm_distribution_response.py +0 -342
  179. data/pulpcore/client/pulp_rpm/models/rpm_rpm_publication.py +0 -301
  180. data/pulpcore/client/pulp_rpm/models/rpm_rpm_publication_response.py +0 -355
  181. data/pulpcore/client/pulp_rpm/models/rpm_rpm_remote.py +0 -684
  182. data/pulpcore/client/pulp_rpm/models/rpm_rpm_remote_response.py +0 -631
  183. data/pulpcore/client/pulp_rpm/models/rpm_rpm_repository.py +0 -468
  184. data/pulpcore/client/pulp_rpm/models/rpm_rpm_repository_response.py +0 -574
  185. data/pulpcore/client/pulp_rpm/models/rpm_uln_remote.py +0 -688
  186. data/pulpcore/client/pulp_rpm/models/rpm_uln_remote_response.py +0 -689
  187. data/pulpcore/client/pulp_rpm/models/rpm_update_collection.py +0 -176
  188. data/pulpcore/client/pulp_rpm/models/rpm_update_collection_response.py +0 -204
  189. data/pulpcore/client/pulp_rpm/models/rpm_update_record.py +0 -151
  190. data/pulpcore/client/pulp_rpm/models/rpm_update_record_response.py +0 -653
  191. data/pulpcore/client/pulp_rpm/models/skip_types_enum.py +0 -100
  192. data/pulpcore/client/pulp_rpm/models/variant_response.py +0 -375
  193. data/pulpcore/client/pulp_rpm/rest.py +0 -292
  194. data/requirements.txt +0 -6
  195. data/setup.cfg +0 -2
  196. data/setup.py +0 -42
  197. data/test-requirements.txt +0 -3
  198. data/test/__init__.py +0 -0
  199. data/test/test_addon_response.py +0 -62
  200. data/test/test_artifact_response.py +0 -63
  201. data/test/test_async_operation_response.py +0 -54
  202. data/test/test_checksum_response.py +0 -56
  203. data/test/test_content_advisories_api.py +0 -55
  204. data/test/test_content_distribution_trees_api.py +0 -48
  205. data/test/test_content_modulemd_defaults_api.py +0 -55
  206. data/test/test_content_modulemds_api.py +0 -55
  207. data/test/test_content_packagecategories_api.py +0 -48
  208. data/test/test_content_packageenvironments_api.py +0 -48
  209. data/test/test_content_packagegroups_api.py +0 -48
  210. data/test/test_content_packagelangpacks_api.py +0 -48
  211. data/test/test_content_packages_api.py +0 -55
  212. data/test/test_content_repo_metadata_files_api.py +0 -48
  213. data/test/test_content_summary.py +0 -70
  214. data/test/test_content_summary_response.py +0 -70
  215. data/test/test_copy.py +0 -55
  216. data/test/test_distributions_rpm_api.py +0 -76
  217. data/test/test_image_response.py +0 -60
  218. data/test/test_metadata_checksum_type_enum.py +0 -52
  219. data/test/test_null_enum.py +0 -52
  220. data/test/test_package_checksum_type_enum.py +0 -52
  221. data/test/test_paginated_repository_version_response_list.py +0 -64
  222. data/test/test_paginatedrpm_distribution_tree_response_list.py +0 -106
  223. data/test/test_paginatedrpm_modulemd_defaults_response_list.py +0 -70
  224. data/test/test_paginatedrpm_modulemd_response_list.py +0 -78
  225. data/test/test_paginatedrpm_package_category_response_list.py +0 -68
  226. data/test/test_paginatedrpm_package_environment_response_list.py +0 -69
  227. data/test/test_paginatedrpm_package_group_response_list.py +0 -71
  228. data/test/test_paginatedrpm_package_langpacks_response_list.py +0 -62
  229. data/test/test_paginatedrpm_package_response_list.py +0 -103
  230. data/test/test_paginatedrpm_repo_metadata_file_response_list.py +0 -71
  231. data/test/test_paginatedrpm_rpm_distribution_response_list.py +0 -67
  232. data/test/test_paginatedrpm_rpm_publication_response_list.py +0 -67
  233. data/test/test_paginatedrpm_rpm_remote_response_list.py +0 -79
  234. data/test/test_paginatedrpm_rpm_repository_response_list.py +0 -75
  235. data/test/test_paginatedrpm_uln_remote_response_list.py +0 -81
  236. data/test/test_paginatedrpm_update_record_response_list.py +0 -88
  237. data/test/test_patchedrpm_rpm_distribution.py +0 -58
  238. data/test/test_patchedrpm_rpm_remote.py +0 -75
  239. data/test/test_patchedrpm_rpm_repository.py +0 -65
  240. data/test/test_patchedrpm_uln_remote.py +0 -75
  241. data/test/test_policy_enum.py +0 -52
  242. data/test/test_publications_rpm_api.py +0 -62
  243. data/test/test_remotes_rpm_api.py +0 -76
  244. data/test/test_remotes_uln_api.py +0 -76
  245. data/test/test_repositories_rpm_api.py +0 -90
  246. data/test/test_repositories_rpm_versions_api.py +0 -61
  247. data/test/test_repository_add_remove_content.py +0 -59
  248. data/test/test_repository_version.py +0 -53
  249. data/test/test_repository_version_response.py +0 -58
  250. data/test/test_rpm_copy_api.py +0 -41
  251. data/test/test_rpm_distribution_tree_response.py +0 -147
  252. data/test/test_rpm_modulemd.py +0 -75
  253. data/test/test_rpm_modulemd_defaults.py +0 -63
  254. data/test/test_rpm_modulemd_defaults_response.py +0 -67
  255. data/test/test_rpm_modulemd_response.py +0 -79
  256. data/test/test_rpm_package.py +0 -57
  257. data/test/test_rpm_package_category_response.py +0 -70
  258. data/test/test_rpm_package_environment_response.py +0 -72
  259. data/test/test_rpm_package_group_response.py +0 -73
  260. data/test/test_rpm_package_langpacks_response.py +0 -58
  261. data/test/test_rpm_package_response.py +0 -97
  262. data/test/test_rpm_repo_metadata_file_response.py +0 -69
  263. data/test/test_rpm_repository_sync_url.py +0 -58
  264. data/test/test_rpm_rpm_distribution.py +0 -60
  265. data/test/test_rpm_rpm_distribution_response.py +0 -63
  266. data/test/test_rpm_rpm_publication.py +0 -59
  267. data/test/test_rpm_rpm_publication_response.py +0 -61
  268. data/test/test_rpm_rpm_remote.py +0 -77
  269. data/test/test_rpm_rpm_remote_response.py +0 -75
  270. data/test/test_rpm_rpm_repository.py +0 -66
  271. data/test/test_rpm_rpm_repository_response.py +0 -70
  272. data/test/test_rpm_uln_remote.py +0 -79
  273. data/test/test_rpm_uln_remote_response.py +0 -79
  274. data/test/test_rpm_update_collection.py +0 -58
  275. data/test/test_rpm_update_collection_response.py +0 -61
  276. data/test/test_rpm_update_record.py +0 -54
  277. data/test/test_rpm_update_record_response.py +0 -82
  278. data/test/test_skip_types_enum.py +0 -52
  279. data/test/test_variant_response.py +0 -72
  280. data/tox.ini +0 -9
@@ -1,156 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by: https://openapi-generator.tech
11
- """
12
-
13
-
14
- from __future__ import absolute_import
15
-
16
- import re # noqa: F401
17
-
18
- # python 2 and python 3 compatibility library
19
- import six
20
-
21
- from pulpcore.client.pulp_rpm.api_client import ApiClient
22
- from pulpcore.client.pulp_rpm.exceptions import ( # noqa: F401
23
- ApiTypeError,
24
- ApiValueError
25
- )
26
-
27
-
28
- class RpmCopyApi(object):
29
- """NOTE: This class is auto generated by OpenAPI Generator
30
- Ref: https://openapi-generator.tech
31
-
32
- Do not edit the class manually.
33
- """
34
-
35
- def __init__(self, api_client=None):
36
- if api_client is None:
37
- api_client = ApiClient()
38
- self.api_client = api_client
39
-
40
- def copy_content(self, copy, **kwargs): # noqa: E501
41
- """Copy content # noqa: E501
42
-
43
- Trigger an asynchronous task to copy RPM contentfrom one repository into another, creating a newrepository version. # noqa: E501
44
- This method makes a synchronous HTTP request by default. To make an
45
- asynchronous HTTP request, please pass async_req=True
46
- >>> thread = api.copy_content(copy, async_req=True)
47
- >>> result = thread.get()
48
-
49
- :param async_req bool: execute request asynchronously
50
- :param Copy copy: (required)
51
- :param _preload_content: if False, the urllib3.HTTPResponse object will
52
- be returned without reading/decoding response
53
- data. Default is True.
54
- :param _request_timeout: timeout setting for this request. If one
55
- number provided, it will be total request
56
- timeout. It can also be a pair (tuple) of
57
- (connection, read) timeouts.
58
- :return: AsyncOperationResponse
59
- If the method is called asynchronously,
60
- returns the request thread.
61
- """
62
- kwargs['_return_http_data_only'] = True
63
- return self.copy_content_with_http_info(copy, **kwargs) # noqa: E501
64
-
65
- def copy_content_with_http_info(self, copy, **kwargs): # noqa: E501
66
- """Copy content # noqa: E501
67
-
68
- Trigger an asynchronous task to copy RPM contentfrom one repository into another, creating a newrepository version. # noqa: E501
69
- This method makes a synchronous HTTP request by default. To make an
70
- asynchronous HTTP request, please pass async_req=True
71
- >>> thread = api.copy_content_with_http_info(copy, async_req=True)
72
- >>> result = thread.get()
73
-
74
- :param async_req bool: execute request asynchronously
75
- :param Copy copy: (required)
76
- :param _return_http_data_only: response data without head status code
77
- and headers
78
- :param _preload_content: if False, the urllib3.HTTPResponse object will
79
- be returned without reading/decoding response
80
- data. Default is True.
81
- :param _request_timeout: timeout setting for this request. If one
82
- number provided, it will be total request
83
- timeout. It can also be a pair (tuple) of
84
- (connection, read) timeouts.
85
- :return: tuple(AsyncOperationResponse, status_code(int), headers(HTTPHeaderDict))
86
- If the method is called asynchronously,
87
- returns the request thread.
88
- """
89
-
90
- local_var_params = locals()
91
-
92
- all_params = [
93
- 'copy'
94
- ]
95
- all_params.extend(
96
- [
97
- 'async_req',
98
- '_return_http_data_only',
99
- '_preload_content',
100
- '_request_timeout'
101
- ]
102
- )
103
-
104
- for key, val in six.iteritems(local_var_params['kwargs']):
105
- if key not in all_params:
106
- raise ApiTypeError(
107
- "Got an unexpected keyword argument '%s'"
108
- " to method copy_content" % key
109
- )
110
- local_var_params[key] = val
111
- del local_var_params['kwargs']
112
- # verify the required parameter 'copy' is set
113
- if self.api_client.client_side_validation and ('copy' not in local_var_params or # noqa: E501
114
- local_var_params['copy'] is None): # noqa: E501
115
- raise ApiValueError("Missing the required parameter `copy` when calling `copy_content`") # noqa: E501
116
-
117
- collection_formats = {}
118
-
119
- path_params = {}
120
-
121
- query_params = []
122
-
123
- header_params = {}
124
-
125
- form_params = []
126
- local_var_files = {}
127
-
128
- body_params = None
129
- if 'copy' in local_var_params:
130
- body_params = local_var_params['copy']
131
- # HTTP header `Accept`
132
- header_params['Accept'] = self.api_client.select_header_accept(
133
- ['application/json']) # noqa: E501
134
-
135
- # HTTP header `Content-Type`
136
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
137
- ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # noqa: E501
138
-
139
- # Authentication setting
140
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
141
-
142
- return self.api_client.call_api(
143
- '/pulp/api/v3/rpm/copy/', 'POST',
144
- path_params,
145
- query_params,
146
- header_params,
147
- body=body_params,
148
- post_params=form_params,
149
- files=local_var_files,
150
- response_type='AsyncOperationResponse', # noqa: E501
151
- auth_settings=auth_settings,
152
- async_req=local_var_params.get('async_req'),
153
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
154
- _preload_content=local_var_params.get('_preload_content', True),
155
- _request_timeout=local_var_params.get('_request_timeout'),
156
- collection_formats=collection_formats)
@@ -1,667 +0,0 @@
1
- # coding: utf-8
2
- """
3
- Pulp 3 API
4
-
5
- Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
6
-
7
- The version of the OpenAPI document: v3
8
- Contact: pulp-list@redhat.com
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
- from __future__ import absolute_import
13
-
14
- import atexit
15
- import datetime
16
- from dateutil.parser import parse
17
- import json
18
- import mimetypes
19
- from multiprocessing.pool import ThreadPool
20
- import os
21
- import re
22
- import tempfile
23
-
24
- # python 2 and python 3 compatibility library
25
- import six
26
- from six.moves.urllib.parse import quote
27
-
28
- from pulpcore.client.pulp_rpm.configuration import Configuration
29
- import pulpcore.client.pulp_rpm.models
30
- from pulpcore.client.pulp_rpm import rest
31
- from pulpcore.client.pulp_rpm.exceptions import ApiValueError, ApiException
32
-
33
-
34
- class ApiClient(object):
35
- """Generic API client for OpenAPI client library builds.
36
-
37
- OpenAPI generic API client. This client handles the client-
38
- server communication, and is invariant across implementations. Specifics of
39
- the methods and models for each application are generated from the OpenAPI
40
- templates.
41
-
42
- NOTE: This class is auto generated by OpenAPI Generator.
43
- Ref: https://openapi-generator.tech
44
- Do not edit the class manually.
45
-
46
- :param configuration: .Configuration object for this client
47
- :param header_name: a header to pass when making calls to the API.
48
- :param header_value: a header value to pass when making calls to
49
- the API.
50
- :param cookie: a cookie to include in the header when making calls
51
- to the API
52
- :param pool_threads: The number of threads to use for async requests
53
- to the API. More threads means more concurrent API requests.
54
- """
55
-
56
- PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
57
- NATIVE_TYPES_MAPPING = {
58
- 'int': int,
59
- 'long': int if six.PY3 else long, # noqa: F821
60
- 'float': float,
61
- 'str': str,
62
- 'bool': bool,
63
- 'date': datetime.date,
64
- 'datetime': datetime.datetime,
65
- 'object': object,
66
- }
67
- _pool = None
68
-
69
- def __init__(self, configuration=None, header_name=None, header_value=None,
70
- cookie=None, pool_threads=1):
71
- if configuration is None:
72
- configuration = Configuration.get_default_copy()
73
- self.configuration = configuration
74
- self.pool_threads = pool_threads
75
-
76
- self.rest_client = rest.RESTClientObject(configuration)
77
- self.default_headers = {}
78
- if header_name is not None:
79
- self.default_headers[header_name] = header_value
80
- self.cookie = cookie
81
- # Set default User-Agent.
82
- self.user_agent = 'OpenAPI-Generator/3.13.2/python'
83
- self.client_side_validation = configuration.client_side_validation
84
-
85
- def __enter__(self):
86
- return self
87
-
88
- def __exit__(self, exc_type, exc_value, traceback):
89
- self.close()
90
-
91
- def close(self):
92
- if self._pool:
93
- self._pool.close()
94
- self._pool.join()
95
- self._pool = None
96
- if hasattr(atexit, 'unregister'):
97
- atexit.unregister(self.close)
98
-
99
- @property
100
- def pool(self):
101
- """Create thread pool on first request
102
- avoids instantiating unused threadpool for blocking clients.
103
- """
104
- if self._pool is None:
105
- atexit.register(self.close)
106
- self._pool = ThreadPool(self.pool_threads)
107
- return self._pool
108
-
109
- @property
110
- def user_agent(self):
111
- """User agent for this API client"""
112
- return self.default_headers['User-Agent']
113
-
114
- @user_agent.setter
115
- def user_agent(self, value):
116
- self.default_headers['User-Agent'] = value
117
-
118
- def set_default_header(self, header_name, header_value):
119
- self.default_headers[header_name] = header_value
120
-
121
- def __call_api(
122
- self, resource_path, method, path_params=None,
123
- query_params=None, header_params=None, body=None, post_params=None,
124
- files=None, response_type=None, auth_settings=None,
125
- _return_http_data_only=None, collection_formats=None,
126
- _preload_content=True, _request_timeout=None, _host=None):
127
-
128
- config = self.configuration
129
-
130
- # header parameters
131
- header_params = header_params or {}
132
- header_params.update(self.default_headers)
133
- if self.cookie:
134
- header_params['Cookie'] = self.cookie
135
- if header_params:
136
- header_params = self.sanitize_for_serialization(header_params)
137
- header_params = dict(self.parameters_to_tuples(header_params,
138
- collection_formats))
139
-
140
- # path parameters
141
- if path_params:
142
- path_params = self.sanitize_for_serialization(path_params)
143
- path_params = self.parameters_to_tuples(path_params,
144
- collection_formats)
145
- for k, v in path_params:
146
- # specified safe chars, encode everything
147
- resource_path = resource_path.replace(
148
- '{%s}' % k,
149
- quote(str(v), safe=config.safe_chars_for_path_param)
150
- )
151
-
152
- # query parameters
153
- if query_params:
154
- query_params = self.sanitize_for_serialization(query_params)
155
- query_params = self.parameters_to_tuples(query_params,
156
- collection_formats)
157
-
158
- # post parameters
159
- if post_params or files:
160
- post_params = post_params if post_params else []
161
- post_params = self.sanitize_for_serialization(post_params)
162
- post_params = self.parameters_to_tuples(post_params,
163
- collection_formats)
164
- post_params.extend(self.files_parameters(files))
165
-
166
- # auth setting
167
- self.update_params_for_auth(header_params, query_params, auth_settings)
168
-
169
- # body
170
- if body:
171
- body = self.sanitize_for_serialization(body)
172
-
173
- # request url
174
- if _host is None:
175
- url = self.configuration.host + resource_path
176
- else:
177
- # use server/host defined in path or operation instead
178
- url = _host + resource_path
179
-
180
- try:
181
- # perform request and return response
182
- response_data = self.request(
183
- method, url, query_params=query_params, headers=header_params,
184
- post_params=post_params, body=body,
185
- _preload_content=_preload_content,
186
- _request_timeout=_request_timeout)
187
- except ApiException as e:
188
- e.body = e.body.decode('utf-8') if six.PY3 else e.body
189
- raise e
190
-
191
- content_type = response_data.getheader('content-type')
192
-
193
- self.last_response = response_data
194
-
195
- return_data = response_data
196
-
197
- if not _preload_content:
198
- return return_data
199
-
200
- if six.PY3 and response_type not in ["file", "bytes"]:
201
- match = None
202
- if content_type is not None:
203
- match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type)
204
- encoding = match.group(1) if match else "utf-8"
205
- response_data.data = response_data.data.decode(encoding)
206
-
207
- # deserialize response data
208
- if response_type:
209
- return_data = self.deserialize(response_data, response_type)
210
- else:
211
- return_data = None
212
-
213
- if _return_http_data_only:
214
- return (return_data)
215
- else:
216
- return (return_data, response_data.status,
217
- response_data.getheaders())
218
-
219
- def sanitize_for_serialization(self, obj):
220
- """Builds a JSON POST object.
221
-
222
- If obj is None, return None.
223
- If obj is str, int, long, float, bool, return directly.
224
- If obj is datetime.datetime, datetime.date
225
- convert to string in iso8601 format.
226
- If obj is list, sanitize each element in the list.
227
- If obj is dict, return the dict.
228
- If obj is OpenAPI model, return the properties dict.
229
-
230
- :param obj: The data to serialize.
231
- :return: The serialized form of data.
232
- """
233
- if obj is None:
234
- return None
235
- elif isinstance(obj, self.PRIMITIVE_TYPES):
236
- return obj
237
- elif isinstance(obj, list):
238
- return [self.sanitize_for_serialization(sub_obj)
239
- for sub_obj in obj]
240
- elif isinstance(obj, tuple):
241
- return tuple(self.sanitize_for_serialization(sub_obj)
242
- for sub_obj in obj)
243
- elif isinstance(obj, (datetime.datetime, datetime.date)):
244
- return obj.isoformat()
245
-
246
- if isinstance(obj, dict):
247
- obj_dict = obj
248
- else:
249
- # Convert model obj to dict except
250
- # attributes `openapi_types`, `attribute_map`
251
- # and attributes which value is not None.
252
- # Convert attribute name to json key in
253
- # model definition for request.
254
- obj_dict = {obj.attribute_map[attr]: getattr(obj, attr)
255
- for attr, _ in six.iteritems(obj.openapi_types)
256
- if getattr(obj, attr) is not None}
257
-
258
- return {key: self.sanitize_for_serialization(val)
259
- for key, val in six.iteritems(obj_dict)}
260
-
261
- def deserialize(self, response, response_type):
262
- """Deserializes response into an object.
263
-
264
- :param response: RESTResponse object to be deserialized.
265
- :param response_type: class literal for
266
- deserialized object, or string of class name.
267
-
268
- :return: deserialized object.
269
- """
270
- # handle file downloading
271
- # save response body into a tmp file and return the instance
272
- if response_type == "file":
273
- return self.__deserialize_file(response)
274
-
275
- # fetch data from response object
276
- try:
277
- data = json.loads(response.data)
278
- except ValueError:
279
- data = response.data
280
-
281
- return self.__deserialize(data, response_type)
282
-
283
- def __deserialize(self, data, klass):
284
- """Deserializes dict, list, str into an object.
285
-
286
- :param data: dict, list or str.
287
- :param klass: class literal, or string of class name.
288
-
289
- :return: object.
290
- """
291
- if data is None:
292
- return None
293
-
294
- if type(klass) == str:
295
- if klass.startswith('list['):
296
- sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
297
- return [self.__deserialize(sub_data, sub_kls)
298
- for sub_data in data]
299
-
300
- if klass.startswith('dict('):
301
- sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2)
302
- return {k: self.__deserialize(v, sub_kls)
303
- for k, v in six.iteritems(data)}
304
-
305
- # convert str to class
306
- if klass in self.NATIVE_TYPES_MAPPING:
307
- klass = self.NATIVE_TYPES_MAPPING[klass]
308
- else:
309
- klass = getattr(pulpcore.client.pulp_rpm.models, klass)
310
-
311
- if klass in self.PRIMITIVE_TYPES:
312
- return self.__deserialize_primitive(data, klass)
313
- elif klass == object:
314
- return self.__deserialize_object(data)
315
- elif klass == datetime.date:
316
- return self.__deserialize_date(data)
317
- elif klass == datetime.datetime:
318
- return self.__deserialize_datetime(data)
319
- else:
320
- return self.__deserialize_model(data, klass)
321
-
322
- def call_api(self, resource_path, method,
323
- path_params=None, query_params=None, header_params=None,
324
- body=None, post_params=None, files=None,
325
- response_type=None, auth_settings=None, async_req=None,
326
- _return_http_data_only=None, collection_formats=None,
327
- _preload_content=True, _request_timeout=None, _host=None):
328
- """Makes the HTTP request (synchronous) and returns deserialized data.
329
-
330
- To make an async_req request, set the async_req parameter.
331
-
332
- :param resource_path: Path to method endpoint.
333
- :param method: Method to call.
334
- :param path_params: Path parameters in the url.
335
- :param query_params: Query parameters in the url.
336
- :param header_params: Header parameters to be
337
- placed in the request header.
338
- :param body: Request body.
339
- :param post_params dict: Request post form parameters,
340
- for `application/x-www-form-urlencoded`, `multipart/form-data`.
341
- :param auth_settings list: Auth Settings names for the request.
342
- :param response: Response data type.
343
- :param files dict: key -> filename, value -> filepath,
344
- for `multipart/form-data`.
345
- :param async_req bool: execute request asynchronously
346
- :param _return_http_data_only: response data without head status code
347
- and headers
348
- :param collection_formats: dict of collection formats for path, query,
349
- header, and post parameters.
350
- :param _preload_content: if False, the urllib3.HTTPResponse object will
351
- be returned without reading/decoding response
352
- data. Default is True.
353
- :param _request_timeout: timeout setting for this request. If one
354
- number provided, it will be total request
355
- timeout. It can also be a pair (tuple) of
356
- (connection, read) timeouts.
357
- :return:
358
- If async_req parameter is True,
359
- the request will be called asynchronously.
360
- The method will return the request thread.
361
- If parameter async_req is False or missing,
362
- then the method will return the response directly.
363
- """
364
- if not async_req:
365
- return self.__call_api(resource_path, method,
366
- path_params, query_params, header_params,
367
- body, post_params, files,
368
- response_type, auth_settings,
369
- _return_http_data_only, collection_formats,
370
- _preload_content, _request_timeout, _host)
371
-
372
- return self.pool.apply_async(self.__call_api, (resource_path,
373
- method, path_params,
374
- query_params,
375
- header_params, body,
376
- post_params, files,
377
- response_type,
378
- auth_settings,
379
- _return_http_data_only,
380
- collection_formats,
381
- _preload_content,
382
- _request_timeout,
383
- _host))
384
-
385
- def request(self, method, url, query_params=None, headers=None,
386
- post_params=None, body=None, _preload_content=True,
387
- _request_timeout=None):
388
- """Makes the HTTP request using RESTClient."""
389
- if method == "GET":
390
- return self.rest_client.GET(url,
391
- query_params=query_params,
392
- _preload_content=_preload_content,
393
- _request_timeout=_request_timeout,
394
- headers=headers)
395
- elif method == "HEAD":
396
- return self.rest_client.HEAD(url,
397
- query_params=query_params,
398
- _preload_content=_preload_content,
399
- _request_timeout=_request_timeout,
400
- headers=headers)
401
- elif method == "OPTIONS":
402
- return self.rest_client.OPTIONS(url,
403
- query_params=query_params,
404
- headers=headers,
405
- _preload_content=_preload_content,
406
- _request_timeout=_request_timeout)
407
- elif method == "POST":
408
- return self.rest_client.POST(url,
409
- query_params=query_params,
410
- headers=headers,
411
- post_params=post_params,
412
- _preload_content=_preload_content,
413
- _request_timeout=_request_timeout,
414
- body=body)
415
- elif method == "PUT":
416
- return self.rest_client.PUT(url,
417
- query_params=query_params,
418
- headers=headers,
419
- post_params=post_params,
420
- _preload_content=_preload_content,
421
- _request_timeout=_request_timeout,
422
- body=body)
423
- elif method == "PATCH":
424
- return self.rest_client.PATCH(url,
425
- query_params=query_params,
426
- headers=headers,
427
- post_params=post_params,
428
- _preload_content=_preload_content,
429
- _request_timeout=_request_timeout,
430
- body=body)
431
- elif method == "DELETE":
432
- return self.rest_client.DELETE(url,
433
- query_params=query_params,
434
- headers=headers,
435
- _preload_content=_preload_content,
436
- _request_timeout=_request_timeout,
437
- body=body)
438
- else:
439
- raise ApiValueError(
440
- "http method must be `GET`, `HEAD`, `OPTIONS`,"
441
- " `POST`, `PATCH`, `PUT` or `DELETE`."
442
- )
443
-
444
- def parameters_to_tuples(self, params, collection_formats):
445
- """Get parameters as list of tuples, formatting collections.
446
-
447
- :param params: Parameters as dict or list of two-tuples
448
- :param dict collection_formats: Parameter collection formats
449
- :return: Parameters as list of tuples, collections formatted
450
- """
451
- new_params = []
452
- if collection_formats is None:
453
- collection_formats = {}
454
- for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501
455
- if k in collection_formats:
456
- collection_format = collection_formats[k]
457
- if collection_format == 'multi':
458
- new_params.extend((k, value) for value in v)
459
- else:
460
- if collection_format == 'ssv':
461
- delimiter = ' '
462
- elif collection_format == 'tsv':
463
- delimiter = '\t'
464
- elif collection_format == 'pipes':
465
- delimiter = '|'
466
- else: # csv is the default
467
- delimiter = ','
468
- new_params.append(
469
- (k, delimiter.join(str(value) for value in v)))
470
- else:
471
- new_params.append((k, v))
472
- return new_params
473
-
474
- def files_parameters(self, files=None):
475
- """Builds form parameters.
476
-
477
- :param files: File parameters.
478
- :return: Form parameters with files.
479
- """
480
- params = []
481
-
482
- if files:
483
- for k, v in six.iteritems(files):
484
- if not v:
485
- continue
486
- file_names = v if type(v) is list else [v]
487
- for n in file_names:
488
- with open(n, 'rb') as f:
489
- filename = os.path.basename(f.name)
490
- filedata = f.read()
491
- mimetype = (mimetypes.guess_type(filename)[0] or
492
- 'application/octet-stream')
493
- params.append(
494
- tuple([k, tuple([filename, filedata, mimetype])]))
495
-
496
- return params
497
-
498
- def select_header_accept(self, accepts):
499
- """Returns `Accept` based on an array of accepts provided.
500
-
501
- :param accepts: List of headers.
502
- :return: Accept (e.g. application/json).
503
- """
504
- if not accepts:
505
- return
506
-
507
- accepts = [x.lower() for x in accepts]
508
-
509
- if 'application/json' in accepts:
510
- return 'application/json'
511
- else:
512
- return ', '.join(accepts)
513
-
514
- def select_header_content_type(self, content_types):
515
- """Returns `Content-Type` based on an array of content_types provided.
516
-
517
- :param content_types: List of content-types.
518
- :return: Content-Type (e.g. application/json).
519
- """
520
- if not content_types:
521
- return 'application/json'
522
-
523
- content_types = [x.lower() for x in content_types]
524
-
525
- if 'application/json' in content_types or '*/*' in content_types:
526
- return 'application/json'
527
- else:
528
- return content_types[0]
529
-
530
- def update_params_for_auth(self, headers, querys, auth_settings):
531
- """Updates header and query params based on authentication setting.
532
-
533
- :param headers: Header parameters dict to be updated.
534
- :param querys: Query parameters tuple list to be updated.
535
- :param auth_settings: Authentication setting identifiers list.
536
- """
537
- if not auth_settings:
538
- return
539
-
540
- for auth in auth_settings:
541
- auth_setting = self.configuration.auth_settings().get(auth)
542
- if auth_setting:
543
- if auth_setting['in'] == 'cookie':
544
- headers['Cookie'] = auth_setting['value']
545
- elif auth_setting['in'] == 'header':
546
- headers[auth_setting['key']] = auth_setting['value']
547
- elif auth_setting['in'] == 'query':
548
- querys.append((auth_setting['key'], auth_setting['value']))
549
- else:
550
- raise ApiValueError(
551
- 'Authentication token must be in `query` or `header`'
552
- )
553
-
554
- def __deserialize_file(self, response):
555
- """Deserializes body to file
556
-
557
- Saves response body into a file in a temporary folder,
558
- using the filename from the `Content-Disposition` header if provided.
559
-
560
- :param response: RESTResponse.
561
- :return: file path.
562
- """
563
- fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
564
- os.close(fd)
565
- os.remove(path)
566
-
567
- content_disposition = response.getheader("Content-Disposition")
568
- if content_disposition:
569
- filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
570
- content_disposition).group(1)
571
- path = os.path.join(os.path.dirname(path), filename)
572
-
573
- with open(path, "wb") as f:
574
- f.write(response.data)
575
-
576
- return path
577
-
578
- def __deserialize_primitive(self, data, klass):
579
- """Deserializes string to primitive type.
580
-
581
- :param data: str.
582
- :param klass: class literal.
583
-
584
- :return: int, long, float, str, bool.
585
- """
586
- try:
587
- return klass(data)
588
- except UnicodeEncodeError:
589
- return six.text_type(data)
590
- except TypeError:
591
- return data
592
-
593
- def __deserialize_object(self, value):
594
- """Return an original value.
595
-
596
- :return: object.
597
- """
598
- return value
599
-
600
- def __deserialize_date(self, string):
601
- """Deserializes string to date.
602
-
603
- :param string: str.
604
- :return: date.
605
- """
606
- try:
607
- return parse(string).date()
608
- except ImportError:
609
- return string
610
- except ValueError:
611
- raise rest.ApiException(
612
- status=0,
613
- reason="Failed to parse `{0}` as date object".format(string)
614
- )
615
-
616
- def __deserialize_datetime(self, string):
617
- """Deserializes string to datetime.
618
-
619
- The string should be in iso8601 datetime format.
620
-
621
- :param string: str.
622
- :return: datetime.
623
- """
624
- try:
625
- return parse(string)
626
- except ImportError:
627
- return string
628
- except ValueError:
629
- raise rest.ApiException(
630
- status=0,
631
- reason=(
632
- "Failed to parse `{0}` as datetime object"
633
- .format(string)
634
- )
635
- )
636
-
637
- def __deserialize_model(self, data, klass):
638
- """Deserializes list or dict to model.
639
-
640
- :param data: dict, list.
641
- :param klass: class literal.
642
- :return: model object.
643
- """
644
- has_discriminator = False
645
- if (hasattr(klass, 'get_real_child_model')
646
- and klass.discriminator_value_class_map):
647
- has_discriminator = True
648
-
649
- if not klass.openapi_types and has_discriminator is False:
650
- return data
651
-
652
- kwargs = {}
653
- if (data is not None and
654
- klass.openapi_types is not None and
655
- isinstance(data, (list, dict))):
656
- for attr, attr_type in six.iteritems(klass.openapi_types):
657
- if klass.attribute_map[attr] in data:
658
- value = data[klass.attribute_map[attr]]
659
- kwargs[attr] = self.__deserialize(value, attr_type)
660
-
661
- instance = klass(**kwargs)
662
-
663
- if has_discriminator:
664
- klass_name = instance.get_real_child_model(data)
665
- if klass_name:
666
- instance = self.__deserialize(data, klass_name)
667
- return instance