bce-python-sdk 0.9.69__tar.gz → 0.9.71__tar.gz

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.
Files changed (213) hide show
  1. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/PKG-INFO +1 -1
  2. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/__init__.py +1 -1
  3. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/http/bce_http_client.py +7 -3
  4. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/http/http_headers.py +2 -0
  5. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bos/bos_client.py +119 -60
  6. bce_python_sdk-0.9.71/baidubce/services/bos/bos_handler.py +110 -0
  7. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bos/storage_class.py +4 -1
  8. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/bce_python_sdk.egg-info/PKG-INFO +1 -1
  9. bce_python_sdk-0.9.69/baidubce/services/bos/bos_handler.py +0 -47
  10. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/README.txt +0 -0
  11. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/auth/__init__.py +0 -0
  12. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/auth/bce_credentials.py +0 -0
  13. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/auth/bce_v1_signer.py +0 -0
  14. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/bce_base_client.py +0 -0
  15. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/bce_client_configuration.py +0 -0
  16. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/bce_response.py +0 -0
  17. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/compat.py +0 -0
  18. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/exception.py +0 -0
  19. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/http/__init__.py +0 -0
  20. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/http/handler.py +0 -0
  21. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/http/http_content_types.py +0 -0
  22. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/http/http_methods.py +0 -0
  23. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/protocol.py +0 -0
  24. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/region.py +0 -0
  25. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/retry/__init__.py +0 -0
  26. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/retry/retry_policy.py +0 -0
  27. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/__init__.py +0 -0
  28. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/__init__.py +0 -0
  29. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/aihc_client.py +0 -0
  30. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/aihc_handler.py +0 -0
  31. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/aihc_model.py +0 -0
  32. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/base/__init__.py +0 -0
  33. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/base/aihc_base_client.py +0 -0
  34. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/base/aihc_common.py +0 -0
  35. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/__init__.py +0 -0
  36. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/dataset/__init__.py +0 -0
  37. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/dataset/dataset_client.py +0 -0
  38. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/dataset/dataset_model.py +0 -0
  39. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/dev_instance/__init__.py +0 -0
  40. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/dev_instance/dev_instance_client.py +0 -0
  41. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/job/__init__.py +0 -0
  42. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/job/job_client.py +0 -0
  43. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/job/job_model.py +0 -0
  44. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/model/__init__.py +0 -0
  45. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/model/model_client.py +0 -0
  46. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/model/model_model.py +0 -0
  47. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/resource_pool/__init__.py +0 -0
  48. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/resource_pool/resource_pool_client.py +0 -0
  49. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/service/__init__.py +0 -0
  50. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/service/service_client.py +0 -0
  51. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/aihc/modules/service/service_model.py +0 -0
  52. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/autoscaling/__init__.py +0 -0
  53. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/autoscaling/as_client.py +0 -0
  54. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/autoscaling/as_handler.py +0 -0
  55. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/autoscaling/as_model.py +0 -0
  56. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bbc/__init__.py +0 -0
  57. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bbc/bbc_client.py +0 -0
  58. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bbc/bbc_model.py +0 -0
  59. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bcc/__init__.py +0 -0
  60. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bcc/bcc_client.py +0 -0
  61. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bcc/bcc_model.py +0 -0
  62. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bcc/fpga_card_type.py +0 -0
  63. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bcc/gpu_card_type.py +0 -0
  64. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bcm/__init__.py +0 -0
  65. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bcm/bcm_client.py +0 -0
  66. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bcm/bcm_handler.py +0 -0
  67. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bcm/bcm_model.py +0 -0
  68. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bes/__init__.py +0 -0
  69. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bes/bes_client.py +0 -0
  70. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bes/bes_model.py +0 -0
  71. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/blb/__init__.py +0 -0
  72. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/blb/app_blb_client.py +0 -0
  73. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/blb/blb_client.py +0 -0
  74. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/blb/user_service_client.py +0 -0
  75. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bls/__init__.py +0 -0
  76. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bls/bls_client.py +0 -0
  77. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bls/bls_handler.py +0 -0
  78. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bls/bls_model.py +0 -0
  79. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bmr/__init__.py +0 -0
  80. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bmr/bmr_client.py +0 -0
  81. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bos/__init__.py +0 -0
  82. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bos/canned_acl.py +0 -0
  83. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bos/common.py +0 -0
  84. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bts/__init__.py +0 -0
  85. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bts/bts_client.py +0 -0
  86. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bts/model.py +0 -0
  87. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/bts/util.py +0 -0
  88. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/ca/__init__.py +0 -0
  89. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/ca/ca_client.py +0 -0
  90. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/ca/ca_handler.py +0 -0
  91. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/ca/ca_model.py +0 -0
  92. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cdn/__init__.py +0 -0
  93. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cdn/cdn_client.py +0 -0
  94. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cdn/cdn_stats_param.py +0 -0
  95. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cert/__init__.py +0 -0
  96. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cert/cert_client.py +0 -0
  97. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cert/cert_model.py +0 -0
  98. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cfc/__init__.py +0 -0
  99. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cfc/cfc_client.py +0 -0
  100. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cfc/cfc_handler.py +0 -0
  101. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cfc/models.py +0 -0
  102. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cloudflow/__init__.py +0 -0
  103. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cloudflow/cloudflow_client.py +0 -0
  104. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/cloudflow/cloudflow_model.py +0 -0
  105. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/csn/__init__.py +0 -0
  106. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/csn/csn_api.py +0 -0
  107. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/csn/csn_client.py +0 -0
  108. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/csn/csn_model.py +0 -0
  109. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/ddc/__init__.py +0 -0
  110. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/ddc/ddc_client.py +0 -0
  111. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/dns/__init__.py +0 -0
  112. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/dns/api/__init__.py +0 -0
  113. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/dns/api/dns_api.py +0 -0
  114. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/dns/dns_client.py +0 -0
  115. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/dumap/__init__.py +0 -0
  116. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/dumap/dumap_client.py +0 -0
  117. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/eip/__init__.py +0 -0
  118. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/eip/eip_bp_client.py +0 -0
  119. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/eip/eip_client.py +0 -0
  120. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/eip/eip_group_client.py +0 -0
  121. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/eip/eip_group_model.py +0 -0
  122. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/eip/eip_tp_client.py +0 -0
  123. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/eip/model.py +0 -0
  124. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/endpoint/__init__.py +0 -0
  125. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/endpoint/endpoint_client.py +0 -0
  126. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/endpoint/model.py +0 -0
  127. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/eni/__init__.py +0 -0
  128. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/eni/eni_client.py +0 -0
  129. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/eni/eni_model.py +0 -0
  130. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/esg/__init__.py +0 -0
  131. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/esg/esg_client.py +0 -0
  132. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/esg/esg_model.py +0 -0
  133. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/et/__init__.py +0 -0
  134. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/et/et_client.py +0 -0
  135. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/et/model.py +0 -0
  136. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/etGateway/__init__.py +0 -0
  137. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/etGateway/et_gateway_client.py +0 -0
  138. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/havip/havip_client.py +0 -0
  139. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/iam/__init__.py +0 -0
  140. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/iam/iam_client.py +0 -0
  141. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/infinite/__init__.py +0 -0
  142. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/infinite/infinite_client.py +0 -0
  143. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/ipv6gateway/__init__.py +0 -0
  144. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/ipv6gateway/ipv6gateway_client.py +0 -0
  145. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/ipv6gateway/ipv6gateway_model.py +0 -0
  146. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/kms/__init__.py +0 -0
  147. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/kms/keyspec_class.py +0 -0
  148. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/kms/kms_client.py +0 -0
  149. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/kms/origin_class.py +0 -0
  150. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/kms/protectedby_class.py +0 -0
  151. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/kms/publickeyencoding_class.py +0 -0
  152. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/lbdc/__init__.py +0 -0
  153. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/lbdc/lbdc_client.py +0 -0
  154. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/lbdc/model.py +0 -0
  155. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/localdns/__init__.py +0 -0
  156. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/localdns/api/__init__.py +0 -0
  157. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/localdns/api/ld_api.py +0 -0
  158. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/localdns/ld_client.py +0 -0
  159. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/media/__init__.py +0 -0
  160. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/media/media_client.py +0 -0
  161. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/media/media_handler.py +0 -0
  162. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/mms/__init__.py +0 -0
  163. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/mms/mms_client.py +0 -0
  164. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/mvs/__init__.py +0 -0
  165. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/mvs/mvs_client.py +0 -0
  166. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/oos/__init__.py +0 -0
  167. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/oos/oos_client.py +0 -0
  168. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/oos/oos_model.py +0 -0
  169. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/probe/__init__.py +0 -0
  170. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/probe/probe_client.py +0 -0
  171. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/rds/__init__.py +0 -0
  172. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/rds/rds_client.py +0 -0
  173. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/rds/rds_model.py +0 -0
  174. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/route/__init__.py +0 -0
  175. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/route/route_client.py +0 -0
  176. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/route/route_model.py +0 -0
  177. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/scs/__init__.py +0 -0
  178. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/scs/model.py +0 -0
  179. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/scs/scs_client.py +0 -0
  180. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/sms/__init__.py +0 -0
  181. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/sms/model.py +0 -0
  182. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/sms/sms_client.py +0 -0
  183. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/sts/__init__.py +0 -0
  184. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/sts/sts_client.py +0 -0
  185. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/subnet/__init__.py +0 -0
  186. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/subnet/subnet_client.py +0 -0
  187. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/tsdb/__init__.py +0 -0
  188. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/tsdb/tsdb_admin_client.py +0 -0
  189. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/tsdb/tsdb_client.py +0 -0
  190. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/tsdb/tsdb_handler.py +0 -0
  191. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vca/__init__.py +0 -0
  192. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vca/vca_client.py +0 -0
  193. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vcr/__init__.py +0 -0
  194. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vcr/vcr_client.py +0 -0
  195. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vpc/__init__.py +0 -0
  196. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vpc/acl_client.py +0 -0
  197. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vpc/nat_client.py +0 -0
  198. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vpc/nat_model.py +0 -0
  199. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vpc/peerconn_client.py +0 -0
  200. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vpc/peerconn_model.py +0 -0
  201. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vpc/template_client.py +0 -0
  202. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vpc/template_model.py +0 -0
  203. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vpc/vpc_client.py +0 -0
  204. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vpn/__init__.py +0 -0
  205. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vpn/vpn_client.py +0 -0
  206. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/services/vpn/vpn_model.py +0 -0
  207. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/baidubce/utils.py +0 -0
  208. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/bce_python_sdk.egg-info/SOURCES.txt +0 -0
  209. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/bce_python_sdk.egg-info/dependency_links.txt +0 -0
  210. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/bce_python_sdk.egg-info/requires.txt +0 -0
  211. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/bce_python_sdk.egg-info/top_level.txt +0 -0
  212. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/setup.cfg +0 -0
  213. {bce_python_sdk-0.9.69 → bce_python_sdk-0.9.71}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bce-python-sdk
3
- Version: 0.9.69
3
+ Version: 0.9.71
4
4
  Summary: BCE SDK for python
5
5
  Home-page: http://bce.baidu.com
6
6
  Author:
@@ -18,7 +18,7 @@ from builtins import bytes
18
18
  from . import protocol
19
19
 
20
20
 
21
- SDK_VERSION = b'0.9.69'
21
+ SDK_VERSION = b'0.9.71'
22
22
  DEFAULT_SERVICE_DOMAIN = b'bcebos.com'
23
23
  URL_PREFIX = b'/v1'
24
24
  DEFAULT_ENCODING = 'UTF-8'
@@ -52,7 +52,6 @@ def _get_connection(protocol, host, port, connection_timeout_in_millis, proxy_ho
52
52
  _logger.debug('Using proxy host: %s, port: %d' % (proxy_host, proxy_port))
53
53
  conn = http.client.HTTPConnection(host=proxy_host, port=proxy_port,
54
54
  timeout=connection_timeout_in_millis / 1000)
55
- conn.set_tunnel(host, port)
56
55
  return conn
57
56
  return http.client.HTTPConnection(
58
57
  host=host, port=port, timeout=connection_timeout_in_millis / 1000)
@@ -191,6 +190,7 @@ def send_request(
191
190
  errors = []
192
191
  while True:
193
192
  conn = None
193
+ redirect_conn = None
194
194
  try:
195
195
  # restore the offset of fp body when retrying
196
196
  if should_get_new_date is True:
@@ -248,7 +248,6 @@ def send_request(
248
248
  location = headers_map.get('location')
249
249
  _logger.debug('request auto follow redirect location is %s', location)
250
250
  parsed_url = urlparse(location)
251
- redirect_conn = None
252
251
  if protocol.name == baidubce.protocol.HTTP.name:
253
252
  redirect_conn = http.client.HTTPConnection(parsed_url.netloc,
254
253
  timeout=config.connection_timeout_in_mills / 1000)
@@ -257,7 +256,10 @@ def send_request(
257
256
  timeout=config.connection_timeout_in_mills / 1000)
258
257
  else:
259
258
  raise ValueError('Invalid protocol: %s, either HTTP or HTTPS is expected.' % protocol)
260
- redirect_conn.putrequest("GET", parsed_url.path + "?" + parsed_url.query,
259
+ redirect_uri = parsed_url.path
260
+ if parsed_url.query:
261
+ redirect_uri += "?" + parsed_url.query
262
+ redirect_conn.putrequest("GET", redirect_uri,
261
263
  skip_host=True, skip_accept_encoding=True)
262
264
  redirect_conn.putheader("Host", parsed_url.netloc)
263
265
  redirect_conn.endheaders()
@@ -269,6 +271,8 @@ def send_request(
269
271
  except Exception as e:
270
272
  if conn is not None:
271
273
  conn.close()
274
+ if redirect_conn is not None:
275
+ redirect_conn.close()
272
276
 
273
277
  # insert ">>>>" before all trace back lines and then save it
274
278
  errors.append('\n'.join('>>>>' + line for line in traceback.format_exc().splitlines()))
@@ -122,6 +122,8 @@ BOS_OBJECT_EXPIRES = b"x-bce-object-expires"
122
122
 
123
123
  BOS_TAGGING = b"x-bce-tagging"
124
124
 
125
+ BOS_TAG_LIST = b"x-bce-tag-list"
126
+
125
127
  BOS_PROCESS = b"x-bce-process"
126
128
 
127
129
  BOS_BASE_ALLOW_HEADERS = set([BOS_TRAFFIC_LIMIT, BOS_VERSIONING, BOS_TAGGING, BOS_PROCESS, BOS_OBJECT_EXPIRES])
@@ -122,7 +122,7 @@ class BosClient(BceBaseClient):
122
122
  return response.location_constraint
123
123
 
124
124
  @required(bucket_name=(bytes, str))
125
- def create_bucket(self, bucket_name, config=None):
125
+ def create_bucket(self, bucket_name, tag_list=None, enable_maz=False, config=None):
126
126
  """
127
127
  Create bucket with specific name
128
128
 
@@ -133,7 +133,23 @@ class BosClient(BceBaseClient):
133
133
  :returns:
134
134
  :rtype: baidubce.bce_response.BceResponse
135
135
  """
136
- return self._send_request(http_methods.PUT, bucket_name, config=config)
136
+ headers = {}
137
+ if tag_list is not None:
138
+ headers[http_headers.BOS_TAG_LIST] = tag_list
139
+
140
+ if enable_maz:
141
+ headers[http_headers.CONTENT_TYPE] = http_content_types.JSON
142
+ body = json.dumps({'enableMultiAz': True})
143
+ else:
144
+ body = None
145
+
146
+ return self._send_request(
147
+ http_methods.PUT,
148
+ bucket_name,
149
+ headers=headers,
150
+ body=body,
151
+ config=config
152
+ )
137
153
 
138
154
  @required(bucket_name=(bytes, str))
139
155
  def does_bucket_exist(self, bucket_name, config=None):
@@ -193,7 +209,7 @@ class BosClient(BceBaseClient):
193
209
  :return:
194
210
  **HttpResponse Class**
195
211
  """
196
- self._send_request(http_methods.PUT,
212
+ return self._send_request(http_methods.PUT,
197
213
  bucket_name,
198
214
  body=json.dumps({'accessControlList': acl},
199
215
  default=BosClient._dump_acl_object),
@@ -201,7 +217,7 @@ class BosClient(BceBaseClient):
201
217
  params={b'acl': b''},
202
218
  config=config)
203
219
 
204
- @required(bucket_name=(bytes, str), canned_acl=bytes)
220
+ @required(bucket_name=(bytes, str), canned_acl=(bytes, ))
205
221
  def set_bucket_canned_acl(self, bucket_name, canned_acl, config=None):
206
222
  """
207
223
 
@@ -210,13 +226,13 @@ class BosClient(BceBaseClient):
210
226
  :param config:
211
227
  :return:
212
228
  """
213
- self._send_request(http_methods.PUT,
229
+ return self._send_request(http_methods.PUT,
214
230
  bucket_name,
215
231
  headers={http_headers.BCE_ACL: canned_acl},
216
232
  params={b'acl': b''},
217
233
  config=config)
218
234
 
219
- @required(bucket_name=(bytes, str))
235
+ @required(bucket_name=(bytes, str), storage_class=(bytes, str))
220
236
  def set_bucket_storage_class(self, bucket_name, storage_class, config=None):
221
237
  """
222
238
 
@@ -259,7 +275,7 @@ class BosClient(BceBaseClient):
259
275
  """
260
276
  return self._send_request(http_methods.DELETE, bucket_name, config=config)
261
277
 
262
- # bucket static website
278
+ # bucket static website
263
279
  @required(bucket_name=(bytes, str))
264
280
  def put_bucket_static_website(self, bucket_name, index=None, not_found=None, config=None):
265
281
  """
@@ -383,7 +399,7 @@ class BosClient(BceBaseClient):
383
399
 
384
400
  # Bucket Copyright Protection
385
401
 
386
- @required(bucket_name=(bytes, str), resource=(list))
402
+ @required(bucket_name=(bytes, str), resource=(list, ))
387
403
  def put_bucket_copyright_protection(self, bucket_name, resource, config=None):
388
404
  """
389
405
  Open image copyright protection and set resource
@@ -439,7 +455,7 @@ class BosClient(BceBaseClient):
439
455
  config=config)
440
456
 
441
457
  # bucket replication
442
- @required(bucket_name=(bytes, str), replication=(dict))
458
+ @required(bucket_name=(bytes, str), replication=(dict, ))
443
459
  def put_bucket_replication(self, bucket_name, replication, config=None):
444
460
  """
445
461
  Open cross-region replication
@@ -549,7 +565,7 @@ class BosClient(BceBaseClient):
549
565
  params={b'replication': b'', b'list': b''},
550
566
  config=config)
551
567
 
552
- @required(bucket_name=(bytes, str), inventory=(dict))
568
+ @required(bucket_name=(bytes, str), inventory=(dict, ))
553
569
  def put_bucket_inventory(self, bucket_name, inventory, config=None):
554
570
  """
555
571
  set bucket inventoru
@@ -709,8 +725,10 @@ class BosClient(BceBaseClient):
709
725
  """
710
726
  key = compat.convert_to_string(key)
711
727
  key = (key or "").strip('/')
728
+ bos_handler.validate_bucket_name(bucket_name)
729
+ bos_handler.validate_object_key(key)
712
730
  key = compat.convert_to_bytes(key)
713
- if len(key) == 0 or key == b'v1':
731
+ if key == b'v1':
714
732
  raise ValueError('generate url the key param error!')
715
733
 
716
734
  config = self._merge_config(config, bucket_name)
@@ -812,7 +830,7 @@ class BosClient(BceBaseClient):
812
830
  params={b'lifecycle': b''},
813
831
  config=config)
814
832
 
815
- @required(bucket_name=(bytes, str), cors_configuration=list)
833
+ @required(bucket_name=(bytes, str), cors_configuration=(list, ))
816
834
  def put_bucket_cors(self,
817
835
  bucket_name,
818
836
  cors_configuration,
@@ -863,7 +881,7 @@ class BosClient(BceBaseClient):
863
881
  params={b'cors': b''},
864
882
  config=config)
865
883
 
866
- @required(bucket_name=(bytes, str))
884
+ @required(bucket_name=(bytes, str))
867
885
  def list_objects(self, bucket_name,
868
886
  max_keys=1000, prefix=None, marker=None, delimiter=None,
869
887
  config=None):
@@ -1161,8 +1179,8 @@ class BosClient(BceBaseClient):
1161
1179
 
1162
1180
  @required(bucket_name=(bytes, str),
1163
1181
  key=(bytes, str),
1164
- data=object,
1165
- content_length=compat.integer_types)
1182
+ data=(object, ),
1183
+ content_length=(compat.integer_types, ))
1166
1184
  def append_object(self, bucket_name, key, data,
1167
1185
  content_length,
1168
1186
  content_md5=None,
@@ -1316,8 +1334,8 @@ class BosClient(BceBaseClient):
1316
1334
 
1317
1335
  @required(bucket_name=(bytes, str),
1318
1336
  key=(bytes, str),
1319
- data=object,
1320
- content_length=compat.integer_types)
1337
+ data=(object, ),
1338
+ content_length=(compat.integer_types, ))
1321
1339
  def put_object(self, bucket_name, key, data,
1322
1340
  content_length,
1323
1341
  content_md5=None,
@@ -1381,7 +1399,7 @@ class BosClient(BceBaseClient):
1381
1399
  content_crc32 = compat.convert_to_bytes(content_crc32)
1382
1400
  if content_crc32c:
1383
1401
  content_crc32c = compat.convert_to_bytes(content_crc32c)
1384
- if content_crc32c_flag:
1402
+ if content_crc32c_flag is not None:
1385
1403
  content_crc32c_flag = compat.convert_to_bytes(content_crc32c_flag)
1386
1404
  if content_crc64ecma:
1387
1405
  content_crc64ecma = compat.convert_to_bytes(content_crc64ecma)
@@ -1662,7 +1680,7 @@ class BosClient(BceBaseClient):
1662
1680
  return self._send_request(http_methods.DELETE, bucket_name, key,
1663
1681
  params=query_params, config=config)
1664
1682
 
1665
- @required(bucket_name=(bytes, str), key_list=list)
1683
+ @required(bucket_name=(bytes, str), key_list=(list, ))
1666
1684
  def delete_multiple_objects(self, bucket_name, key_list, config=None):
1667
1685
  """
1668
1686
  Delete Multiple Objects
@@ -1701,11 +1719,14 @@ class BosClient(BceBaseClient):
1701
1719
  :return:
1702
1720
  **HttpResponse Class**
1703
1721
  """
1722
+ body = {'targetBucket': compat.convert_to_string(target_bucket)}
1723
+ if target_prefix is not None:
1724
+ body['targetPrefix'] = compat.convert_to_string(target_prefix)
1725
+
1704
1726
  return self._send_request(http_methods.PUT,
1705
1727
  source_bucket,
1706
1728
  params={b'logging': b''},
1707
- body=json.dumps({'targetBucket': target_bucket,
1708
- 'targetPrefix': target_prefix}),
1729
+ body=json.dumps(body),
1709
1730
  config=config)
1710
1731
 
1711
1732
  @required(bucket_name=(bytes, str))
@@ -1784,9 +1805,9 @@ class BosClient(BceBaseClient):
1784
1805
  @required(bucket_name=(bytes, str),
1785
1806
  key=(bytes, str),
1786
1807
  upload_id=(bytes, str),
1787
- part_number=int,
1788
- part_size=compat.integer_types,
1789
- part_fp=object)
1808
+ part_number=(int, ),
1809
+ part_size=(compat.integer_types, ),
1810
+ part_fp=(object, ))
1790
1811
  def upload_part(self, bucket_name, key, upload_id, part_number, part_size, part_fp, part_md5=None,
1791
1812
  part_crc32=None, part_sha256=None, part_crc32c=None, part_crc32c_flag=None,
1792
1813
  part_crc64ecma=None, progress_callback=None, traffic_limit=None, config=None):
@@ -1871,9 +1892,7 @@ class BosClient(BceBaseClient):
1871
1892
 
1872
1893
  if progress_callback:
1873
1894
  part_fp = utils.make_progress_adapter(part_fp, progress_callback, part_size)
1874
-
1875
- if traffic_limit is not None:
1876
- headers[http_headers.BOS_TRAFFIC_LIMIT] = traffic_limit
1895
+
1877
1896
  return self._send_request(
1878
1897
  http_methods.PUT,
1879
1898
  bucket_name,
@@ -1888,9 +1907,9 @@ class BosClient(BceBaseClient):
1888
1907
  target_bucket_name=(bytes, str),
1889
1908
  target_key=(bytes, str),
1890
1909
  upload_id=(bytes, str),
1891
- part_number=int,
1892
- part_size=compat.integer_types,
1893
- offset=compat.integer_types)
1910
+ part_number=(int, ),
1911
+ part_size=(compat.integer_types, ),
1912
+ offset=(compat.integer_types, ))
1894
1913
  def upload_part_copy(self,
1895
1914
  source_bucket_name, source_key,
1896
1915
  target_bucket_name, target_key,
@@ -1946,10 +1965,10 @@ class BosClient(BceBaseClient):
1946
1965
  @required(bucket_name=(bytes, str),
1947
1966
  key=(bytes, str),
1948
1967
  upload_id=(bytes, str),
1949
- part_number=int,
1950
- part_size=compat.integer_types,
1968
+ part_number=(int, ),
1969
+ part_size=(compat.integer_types, ),
1951
1970
  file_name=(bytes, str),
1952
- offset=compat.integer_types)
1971
+ offset=(compat.integer_types, ))
1953
1972
  def upload_part_from_file(self, bucket_name, key, upload_id,
1954
1973
  part_number, part_size, file_name, offset, part_md5=None,
1955
1974
  part_crc32=None, part_sha256=None, part_crc32c=None,
@@ -1984,7 +2003,7 @@ class BosClient(BceBaseClient):
1984
2003
  @required(bucket_name=(bytes, str),
1985
2004
  key=(bytes, str),
1986
2005
  upload_id=(bytes, str),
1987
- part_list=list)
2006
+ part_list=(list, ))
1988
2007
  def complete_multipart_upload(self, bucket_name, key,
1989
2008
  upload_id, part_list,
1990
2009
  user_headers=None,
@@ -2032,7 +2051,8 @@ class BosClient(BceBaseClient):
2032
2051
  key,
2033
2052
  body=json.dumps({'parts': part_list}),
2034
2053
  headers=headers,
2035
- params={b'uploadId': upload_id})
2054
+ params={b'uploadId': upload_id},
2055
+ config=config)
2036
2056
 
2037
2057
  @required(bucket_name=(bytes, str), key=(bytes, str), upload_id=(bytes, str))
2038
2058
  def abort_multipart_upload(self, bucket_name, key, upload_id, config=None):
@@ -2052,7 +2072,8 @@ class BosClient(BceBaseClient):
2052
2072
  """
2053
2073
  key = compat.convert_to_bytes(key)
2054
2074
  return self._send_request(http_methods.DELETE, bucket_name, key,
2055
- params={b'uploadId': upload_id})
2075
+ params={b'uploadId': upload_id},
2076
+ config=config)
2056
2077
 
2057
2078
  @required(bucket_name=(bytes, str), key=(bytes, str), upload_id=(bytes, str))
2058
2079
  def list_parts(self, bucket_name, key, upload_id,
@@ -2303,7 +2324,7 @@ class BosClient(BceBaseClient):
2303
2324
  **HttpResponse Class**
2304
2325
  """
2305
2326
  key = compat.convert_to_bytes(key)
2306
- self._send_request(http_methods.PUT,
2327
+ return self._send_request(http_methods.PUT,
2307
2328
  bucket_name,
2308
2329
  key,
2309
2330
  body=json.dumps({'accessControlList': acl},
@@ -2360,7 +2381,7 @@ class BosClient(BceBaseClient):
2360
2381
  elif num_args >= 2:
2361
2382
  raise ValueError("cann't get more than one object canned acl arguments!")
2362
2383
 
2363
- self._send_request(http_methods.PUT,
2384
+ return self._send_request(http_methods.PUT,
2364
2385
  bucket_name,
2365
2386
  key,
2366
2387
  headers=headers,
@@ -2450,7 +2471,7 @@ class BosClient(BceBaseClient):
2450
2471
  params={b'fetch': b''},
2451
2472
  config=config)
2452
2473
 
2453
- @required(bucket_name=(bytes, str), target_key=(bytes, str), symlink=(bytes, str), forbid_overwrite=(bool))
2474
+ @required(bucket_name=(bytes, str), target_key=(bytes, str), symlink=(bytes, str), forbid_overwrite=(bool, ))
2454
2475
  def put_object_symlink(self, bucket_name, target_key, symlink, forbid_overwrite=None,
2455
2476
  user_metadata=None, storage_class=None, target_bucket=None, content_type=None, config=None):
2456
2477
  """
@@ -2513,7 +2534,7 @@ class BosClient(BceBaseClient):
2513
2534
  params={b'symlink': b''},
2514
2535
  config=config)
2515
2536
 
2516
- @required(bucket_name=(bytes, str), key=(bytes, str), select_object_args=(dict, ))
2537
+ @required(bucket_name=(bytes, str), key=(bytes, str), select_object_args=(dict))
2517
2538
  def select_object(self, bucket_name, key, select_object_args, headers=None, config=None):
2518
2539
  """
2519
2540
 
@@ -2561,7 +2582,7 @@ class BosClient(BceBaseClient):
2561
2582
  return self._send_request(
2562
2583
  http_methods.GET, params={b'userQuota': b''}, config=config,)
2563
2584
 
2564
- @required(max_bucket_count=(int), max_capacity_mega_bytes=(int))
2585
+ @required(max_bucket_count=(int), max_capacity_mega_bytes=(int, ))
2565
2586
  def put_user_quota(self, max_bucket_count, max_capacity_mega_bytes, config=None):
2566
2587
  """
2567
2588
  put user quota
@@ -2626,6 +2647,7 @@ class BosClient(BceBaseClient):
2626
2647
  http_methods.PUT, bucket_name=bucket_name,
2627
2648
  body=json.dumps({'notifications': notifications}),
2628
2649
  params={b'notification': b''}, config=config,)
2650
+
2629
2651
  @required(bucket_name=(bytes, str))
2630
2652
  def delete_notification(self, bucket_name, config=None):
2631
2653
  """
@@ -2693,6 +2715,7 @@ class BosClient(BceBaseClient):
2693
2715
  config=config,
2694
2716
  )
2695
2717
 
2718
+ @required(bucket_name=(bytes, str), key=(bytes, str), obj_tag_args=(dict, ))
2696
2719
  def put_object_tagging(self, bucket_name, key, obj_tag_args, config=None):
2697
2720
  """
2698
2721
  put object tagging
@@ -2741,6 +2764,28 @@ class BosClient(BceBaseClient):
2741
2764
  params={b'tagging': b''},
2742
2765
  config=config,)
2743
2766
 
2767
+ @required(bucket_name=(bytes, str), key=(bytes, str))
2768
+ def delete_object_tagging(self, bucket_name, key, config=None):
2769
+ """
2770
+ delete object tagging
2771
+
2772
+ :type bucket_name: string
2773
+ :param bucket_name: bucket name
2774
+
2775
+ :type key: string
2776
+ :param key: object name
2777
+
2778
+ :return:
2779
+ """
2780
+ key = compat.convert_to_bytes(key)
2781
+ return self._send_request(
2782
+ http_methods.DELETE,
2783
+ bucket_name=bucket_name,
2784
+ key=key,
2785
+ params={b'tagging': b''},
2786
+ config=config)
2787
+
2788
+ @required(bucket_name=(bytes, str), key=(bytes, str))
2744
2789
  def get_object_tagging(self, bucket_name, key, config=None):
2745
2790
  """
2746
2791
  put object tagging
@@ -2760,6 +2805,7 @@ class BosClient(BceBaseClient):
2760
2805
  params={b'tagging': b''},
2761
2806
  config=config,)
2762
2807
 
2808
+ @required(bucket_name=(bytes, str), status=(bytes, str))
2763
2809
  def put_bucket_versioning(self, bucket_name, status, config=None):
2764
2810
  """
2765
2811
  put bucket versioning
@@ -2780,6 +2826,7 @@ class BosClient(BceBaseClient):
2780
2826
  headers={http_headers.CONTENT_TYPE: http_content_types.JSON},
2781
2827
  config=config,)
2782
2828
 
2829
+ @required(bucket_name=(bytes, str))
2783
2830
  def get_bucket_versioning(self, bucket_name, config=None):
2784
2831
  """
2785
2832
  get bucket versioning
@@ -2795,7 +2842,7 @@ class BosClient(BceBaseClient):
2795
2842
  params={b'versioning': b''},
2796
2843
  config=config,)
2797
2844
 
2798
- @required(bucket_name=(bytes, str))
2845
+ @required(bucket_name=(bytes, str))
2799
2846
  def list_objects_versions(self, bucket_name,
2800
2847
  max_keys=1000, prefix=None, marker=None, version_marker=None,
2801
2848
  delimiter=None, config=None):
@@ -2834,7 +2881,7 @@ class BosClient(BceBaseClient):
2834
2881
 
2835
2882
  return self._send_request(http_methods.GET, bucket_name, params=params, config=config)
2836
2883
 
2837
- @required(bucket_name=(bytes, str), cors_configuration=list)
2884
+ @required(bucket_name=(bytes, str), retention_days=(int, ))
2838
2885
  def init_bucket_object_lock(self,
2839
2886
  bucket_name,
2840
2887
  retention_days,
@@ -2885,8 +2932,8 @@ class BosClient(BceBaseClient):
2885
2932
  params={b'objectlock': b''},
2886
2933
  config=config)
2887
2934
 
2888
- @required(bucket_name=(bytes, str), cors_configuration=list)
2889
- def complete_bucket_object_lock(self,
2935
+ @required(bucket_name=(bytes, str))
2936
+ def complete_bucket_object_lock(self,
2890
2937
  bucket_name,
2891
2938
  config=None):
2892
2939
  """
@@ -2904,7 +2951,7 @@ class BosClient(BceBaseClient):
2904
2951
  params={b'completeobjectlock': b''},
2905
2952
  config=config)
2906
2953
 
2907
- @required(bucket_name=(bytes, str), cors_configuration=list)
2954
+ @required(bucket_name=(bytes, str), extend_retent_days=(int, ))
2908
2955
  def extend_bucket_object_lock(self,
2909
2956
  bucket_name,
2910
2957
  extend_retent_days,
@@ -2925,7 +2972,7 @@ class BosClient(BceBaseClient):
2925
2972
  body=json.dumps({'extendRetentionDays': extend_retent_days}),
2926
2973
  config=config)
2927
2974
 
2928
- @required(bucket_name=(bytes, str), cors_configuration=list)
2975
+ @required(bucket_name=(bytes, str))
2929
2976
  def get_bucket_quota(self,
2930
2977
  bucket_name,
2931
2978
  config=None):
@@ -2940,8 +2987,8 @@ class BosClient(BceBaseClient):
2940
2987
  bucket_name,
2941
2988
  params={b'quota': b''},
2942
2989
  config=config)
2943
-
2944
- @required(bucket_name=(bytes, str), cors_configuration=list)
2990
+
2991
+ @required(bucket_name=(bytes, str), quota_conf=(dict, ))
2945
2992
  def put_bucket_quota(self,
2946
2993
  bucket_name,
2947
2994
  quota_conf,
@@ -2962,7 +3009,7 @@ class BosClient(BceBaseClient):
2962
3009
  params={b'quota': b''},
2963
3010
  config=config)
2964
3011
 
2965
- @required(bucket_name=(bytes, str), cors_configuration=list)
3012
+ @required(bucket_name=(bytes, str))
2966
3013
  def delete_bucket_quota(self,
2967
3014
  bucket_name,
2968
3015
  config=None):
@@ -2978,7 +3025,7 @@ class BosClient(BceBaseClient):
2978
3025
  params={b'quota': b''},
2979
3026
  config=config)
2980
3027
 
2981
- @required(bucket_name=(bytes, str), cors_configuration=list)
3028
+ @required(bucket_name=(bytes, str))
2982
3029
  def get_bucket_tagging(self,
2983
3030
  bucket_name,
2984
3031
  config=None):
@@ -2994,7 +3041,7 @@ class BosClient(BceBaseClient):
2994
3041
  params={b'tagging': b''},
2995
3042
  config=config)
2996
3043
 
2997
- @required(bucket_name=(bytes, str), cors_configuration=list)
3044
+ @required(bucket_name=(bytes, str), tag_conf=(dict, ))
2998
3045
  def put_bucket_tagging(self,
2999
3046
  bucket_name,
3000
3047
  tag_conf,
@@ -3015,7 +3062,7 @@ class BosClient(BceBaseClient):
3015
3062
  params={b'tagging': b''},
3016
3063
  config=config)
3017
3064
 
3018
- @required(bucket_name=(bytes, str), cors_configuration=list)
3065
+ @required(bucket_name=(bytes, str))
3019
3066
  def delete_bucket_tagging(self,
3020
3067
  bucket_name,
3021
3068
  config=None):
@@ -3198,7 +3245,7 @@ class BosClient(BceBaseClient):
3198
3245
  if use_backup_endpoint:
3199
3246
  host = config.backup_endpoint
3200
3247
  endpoint_protocol, host_name, endpoint_port = \
3201
- utils.parse_host_port(config.endpoint, config.protocol)
3248
+ utils.parse_host_port(host, config.protocol)
3202
3249
  if config.cname_enabled or utils.is_cname_like_host(host_name) or utils.is_custom_host(host_name, bucket_name):
3203
3250
  return utils.append_uri(bos.URL_PREFIX, key)
3204
3251
 
@@ -3294,6 +3341,7 @@ class BosClient(BceBaseClient):
3294
3341
  self, http_method, bucket_name=None, key=None,
3295
3342
  body=None, headers=None, params=None,
3296
3343
  config=None, body_parser=None):
3344
+ bos_handler.validate_bucket_name(bucket_name)
3297
3345
  config = self._merge_config(config, bucket_name)
3298
3346
 
3299
3347
  path = BosClient._get_path(config, bucket_name, key)
@@ -3306,6 +3354,13 @@ class BosClient(BceBaseClient):
3306
3354
 
3307
3355
  last_exception = None
3308
3356
  e = None
3357
+ # record the initial position of fp body before any request attempt,
3358
+ # so retries (backup endpoint or BOS error) can seek back to the correct
3359
+ # starting offset instead of blindly seeking to 0 (which would break
3360
+ # upload_part_from_file where the fp starts at a non-zero offset).
3361
+ body_initial_offset = None
3362
+ if hasattr(body, 'tell') and hasattr(body, 'seek'):
3363
+ body_initial_offset = body.tell()
3309
3364
  try:
3310
3365
  return bce_http_client.send_request(
3311
3366
  config, bce_v1_signer.sign, [handler.parse_error, body_parser],
@@ -3314,10 +3369,14 @@ class BosClient(BceBaseClient):
3314
3369
  last_exception = ex
3315
3370
  e = ex
3316
3371
 
3372
+ original_path = path
3317
3373
  # retry backup endpoint
3318
- if e is not None and config.backup_endpoint is not None and BosClient._need_retry_backup_endpoint(e):
3374
+ if e is not None and config.backup_endpoint is not None \
3375
+ and BosClient._need_retry_backup_endpoint(e.last_error):
3319
3376
  try:
3320
- _logger.debug(b'Retry for backup endpoint error code: %d.', e.status_code)
3377
+ if body_initial_offset is not None:
3378
+ body.seek(body_initial_offset)
3379
+ _logger.debug(b'Retry for backup endpoint error code: %s.', e.status_code)
3321
3380
  path = BosClient._get_path(config, bucket_name, key, True)
3322
3381
  return bce_http_client.send_request(
3323
3382
  config, bce_v1_signer.sign, [handler.parse_error, body_parser],
@@ -3329,10 +3388,12 @@ class BosClient(BceBaseClient):
3329
3388
  # retry for bos error
3330
3389
  if e is not None and BosClient._need_retry_for_bos(config, e.last_error):
3331
3390
  try:
3332
- _logger.debug(b'Retry for BOS error code: %d.', e.status_code)
3391
+ if body_initial_offset is not None:
3392
+ body.seek(body_initial_offset)
3393
+ _logger.debug(b'Retry for BOS error code: %s.', e.status_code)
3333
3394
  return bce_http_client.send_request(
3334
3395
  config, bce_v1_signer.sign, [handler.parse_error, body_parser],
3335
- http_method, path, body, headers, params)
3396
+ http_method, original_path, body, headers, params)
3336
3397
  except BceHttpClientError as ex:
3337
3398
  last_exception = ex
3338
3399
  e = ex
@@ -3405,7 +3466,6 @@ class SelectResponse(object):
3405
3466
  prelude = f.read(8)
3406
3467
  if not prelude:
3407
3468
  raise StopIteration
3408
- return
3409
3469
  total_len = struct.unpack('>I', prelude[0:4])[0]
3410
3470
  headers_len = struct.unpack('>I', prelude[4:8])[0]
3411
3471
  headers = f.read(headers_len)
@@ -3430,7 +3490,6 @@ class SelectResponse(object):
3430
3490
  if headers_map["error-code"] != "success":
3431
3491
  raise BceServerError(headers_map['error-message'], code=headers_map['error-code'],
3432
3492
  request_id=self.response.metadata.bce_request_id)
3433
- return
3434
3493
  msg.set_end_message(headers_map, crc)
3435
3494
  self.finish = True
3436
3495
  yield msg