bce-python-sdk 0.9.56__tar.gz → 0.9.59__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.
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/PKG-INFO +1 -1
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/__init__.py +1 -1
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/http/bce_http_client.py +12 -1
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/http/http_headers.py +10 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bcc/bcc_client.py +114 -6
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bcc/bcc_model.py +2 -1
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bos/bos_client.py +121 -20
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/esg/esg_client.py +0 -1
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/bce_python_sdk.egg-info/PKG-INFO +1 -1
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/README.txt +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/auth/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/auth/bce_credentials.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/auth/bce_v1_signer.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/bce_base_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/bce_client_configuration.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/bce_response.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/compat.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/exception.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/http/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/http/handler.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/http/http_content_types.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/http/http_methods.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/protocol.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/region.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/retry/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/retry/retry_policy.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/aihc_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/aihc_handler.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/aihc_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/base/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/base/aihc_base_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/base/aihc_common.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/dataset/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/dataset/dataset_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/dataset/dataset_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/dev_instance/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/dev_instance/dev_instance_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/job/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/job/job_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/job/job_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/model/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/model/model_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/model/model_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/resource_pool/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/resource_pool/resource_pool_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/service/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/service/service_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/aihc/modules/service/service_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/autoscaling/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/autoscaling/as_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/autoscaling/as_handler.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/autoscaling/as_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bbc/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bbc/bbc_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bbc/bbc_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bcc/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bcc/fpga_card_type.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bcc/gpu_card_type.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bcm/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bcm/bcm_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bcm/bcm_handler.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bcm/bcm_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bes/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bes/bes_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bes/bes_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/blb/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/blb/app_blb_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/blb/blb_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/blb/user_service_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bls/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bls/bls_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bls/bls_handler.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bls/bls_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bmr/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bmr/bmr_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bos/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bos/bos_handler.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bos/canned_acl.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bos/common.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bos/storage_class.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bts/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bts/bts_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bts/model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/bts/util.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/ca/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/ca/ca_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/ca/ca_handler.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/ca/ca_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/cdn/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/cdn/cdn_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/cdn/cdn_stats_param.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/cert/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/cert/cert_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/cert/cert_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/cfc/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/cfc/cfc_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/cfc/cfc_handler.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/cfc/models.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/csn/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/csn/csn_api.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/csn/csn_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/csn/csn_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/ddc/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/ddc/ddc_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/dns/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/dns/api/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/dns/api/dns_api.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/dns/dns_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/dumap/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/dumap/dumap_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/eip/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/eip/eip_bp_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/eip/eip_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/eip/eip_group_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/eip/eip_group_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/eip/eip_tp_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/eip/model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/endpoint/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/endpoint/endpoint_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/endpoint/model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/eni/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/eni/eni_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/eni/eni_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/esg/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/esg/esg_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/et/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/et/et_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/et/model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/etGateway/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/etGateway/et_gateway_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/havip/havip_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/iam/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/iam/iam_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/infinite/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/infinite/infinite_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/ipv6gateway/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/ipv6gateway/ipv6gateway_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/ipv6gateway/ipv6gateway_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/kms/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/kms/keyspec_class.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/kms/kms_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/kms/origin_class.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/kms/protectedby_class.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/kms/publickeyencoding_class.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/lbdc/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/lbdc/lbdc_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/lbdc/model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/localdns/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/localdns/api/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/localdns/api/ld_api.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/localdns/ld_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/media/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/media/media_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/media/media_handler.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/mms/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/mms/mms_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/mvs/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/mvs/mvs_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/oos/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/oos/oos_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/oos/oos_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/probe/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/probe/probe_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/rds/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/rds/rds_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/rds/rds_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/route/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/route/route_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/route/route_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/scs/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/scs/model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/scs/scs_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/sms/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/sms/model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/sms/sms_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/sts/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/sts/sts_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/subnet/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/subnet/subnet_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/tsdb/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/tsdb/tsdb_admin_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/tsdb/tsdb_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/tsdb/tsdb_handler.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vca/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vca/vca_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vcr/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vcr/vcr_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vpc/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vpc/acl_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vpc/nat_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vpc/nat_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vpc/peerconn_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vpc/peerconn_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vpc/template_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vpc/template_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vpc/vpc_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vpn/__init__.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vpn/vpn_client.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/services/vpn/vpn_model.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/baidubce/utils.py +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/bce_python_sdk.egg-info/SOURCES.txt +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/bce_python_sdk.egg-info/dependency_links.txt +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/bce_python_sdk.egg-info/requires.txt +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/bce_python_sdk.egg-info/top_level.txt +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/setup.cfg +0 -0
- {bce_python_sdk-0.9.56 → bce_python_sdk-0.9.59}/setup.py +0 -0
|
@@ -237,9 +237,18 @@ def send_request(
|
|
|
237
237
|
if http_method == b'GET' and 300 <= http_response.status < 400:
|
|
238
238
|
headers_map = {k: v for k, v in headers_list}
|
|
239
239
|
if 'location' in headers_map:
|
|
240
|
+
try:
|
|
241
|
+
http_response.read()
|
|
242
|
+
except Exception:
|
|
243
|
+
_logger.info("ignore read response body error")
|
|
244
|
+
try:
|
|
245
|
+
http_response.close()
|
|
246
|
+
except Exception:
|
|
247
|
+
_logger.info("ignore close response connection error")
|
|
240
248
|
location = headers_map.get('location')
|
|
241
249
|
_logger.debug('request auto follow redirect location is %s', location)
|
|
242
250
|
parsed_url = urlparse(location)
|
|
251
|
+
redirect_conn = None
|
|
243
252
|
if protocol.name == baidubce.protocol.HTTP.name:
|
|
244
253
|
redirect_conn = http.client.HTTPConnection(parsed_url.netloc,
|
|
245
254
|
timeout=config.connection_timeout_in_mills / 1000)
|
|
@@ -248,8 +257,10 @@ def send_request(
|
|
|
248
257
|
timeout=config.connection_timeout_in_mills / 1000)
|
|
249
258
|
else:
|
|
250
259
|
raise ValueError('Invalid protocol: %s, either HTTP or HTTPS is expected.' % protocol)
|
|
251
|
-
redirect_conn.
|
|
260
|
+
redirect_conn.putrequest("GET", parsed_url.path + "?" + parsed_url.query,
|
|
252
261
|
skip_host=True, skip_accept_encoding=True)
|
|
262
|
+
redirect_conn.putheader("Host", parsed_url.netloc)
|
|
263
|
+
redirect_conn.endheaders()
|
|
253
264
|
http_response = redirect_conn.getresponse()
|
|
254
265
|
for handler_function in response_handler_functions:
|
|
255
266
|
if handler_function(http_response, response):
|
|
@@ -118,6 +118,16 @@ BOS_PROCESS = b"x-bce-process"
|
|
|
118
118
|
|
|
119
119
|
BOS_BASE_ALLOW_HEADERS = set([BOS_TRAFFIC_LIMIT, BOS_VERSIONING, BOS_TAGGING, BOS_PROCESS, BOS_OBJECT_EXPIRES])
|
|
120
120
|
|
|
121
|
+
BOS_IF_MATCH = b"If-Match"
|
|
122
|
+
|
|
123
|
+
BOS_IF_NONE_MATCH = b"If-None-Match"
|
|
124
|
+
|
|
125
|
+
BOS_IF_MODIFIED_SINCE = b"If-Modified-Since"
|
|
126
|
+
|
|
127
|
+
BOS_IF_UNMODIFIED_SINCE = b"If-Unmodified-Since"
|
|
128
|
+
|
|
129
|
+
BOS_COND_READ_WRITE_HEADERS = set([BOS_IF_UNMODIFIED_SINCE, BOS_IF_MATCH, BOS_IF_NONE_MATCH])
|
|
130
|
+
|
|
121
131
|
# BOS HTTP Headers END
|
|
122
132
|
|
|
123
133
|
# STS HTTP Headers
|
|
@@ -1516,7 +1516,9 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
1516
1516
|
@required(instance_id=(bytes, str), # ***Unicode***
|
|
1517
1517
|
image_id=(bytes, str)) # ***Unicode***
|
|
1518
1518
|
def rebuild_instance(self, instance_id, image_id, admin_pass=None, key_pair_id=None, is_keep_image_login=None,
|
|
1519
|
-
config=None
|
|
1519
|
+
config=None, user_data=None, clean_last_user_data=None, is_open_hostEye=None,
|
|
1520
|
+
sys_root_size=None, is_preserve_data=None, raid_id=None, data_partition_type=None,
|
|
1521
|
+
root_partition_type=None):
|
|
1520
1522
|
"""
|
|
1521
1523
|
Rebuilding the instance owned by the user.
|
|
1522
1524
|
After rebuilding the instance,
|
|
@@ -1545,6 +1547,40 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
1545
1547
|
key_pair_id or admin_pass is required for rebuild instance.
|
|
1546
1548
|
:type key_pair_id: string
|
|
1547
1549
|
|
|
1550
|
+
:param user_data:
|
|
1551
|
+
User data to pass to the instance at launch time.
|
|
1552
|
+
:type user_data: string
|
|
1553
|
+
|
|
1554
|
+
:param clean_last_user_data:
|
|
1555
|
+
Indicates whether to clean the user data after the instance has been rebuilded.
|
|
1556
|
+
Default value is False.
|
|
1557
|
+
:type clean_user_data: boolean
|
|
1558
|
+
|
|
1559
|
+
:param is_open_hostEye:
|
|
1560
|
+
Indicates whether to open host eye.
|
|
1561
|
+
:type is_open_hostEye: boolean
|
|
1562
|
+
|
|
1563
|
+
:param sys_root_size:
|
|
1564
|
+
System partition size (unit: GB).
|
|
1565
|
+
:type sys_root_size: int
|
|
1566
|
+
|
|
1567
|
+
:param is_preserve_data:
|
|
1568
|
+
Indicates whether to preserve data during the instance rebuilding process.
|
|
1569
|
+
Default value is False.
|
|
1570
|
+
:type is_preserve_data: boolean
|
|
1571
|
+
|
|
1572
|
+
:param raid_id:
|
|
1573
|
+
RAID ID.
|
|
1574
|
+
:type raid_id: string
|
|
1575
|
+
|
|
1576
|
+
:param data_partition_type:
|
|
1577
|
+
Data partition type.
|
|
1578
|
+
:type data_partition_type: string
|
|
1579
|
+
|
|
1580
|
+
:param root_partition_type:
|
|
1581
|
+
Root partition type.
|
|
1582
|
+
:type root_partition_type: string
|
|
1583
|
+
|
|
1548
1584
|
:return:
|
|
1549
1585
|
:rtype baidubce.bce_response.BceResponse
|
|
1550
1586
|
"""
|
|
@@ -1561,6 +1597,22 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
1561
1597
|
secret_access_key = self.config.credentials.secret_access_key
|
|
1562
1598
|
cipher_admin_pass = aes128_encrypt_16char_key(admin_pass, secret_access_key)
|
|
1563
1599
|
body['adminPass'] = cipher_admin_pass
|
|
1600
|
+
if user_data is not None:
|
|
1601
|
+
body['userData'] = user_data
|
|
1602
|
+
if clean_last_user_data is not None:
|
|
1603
|
+
body['cleanLastUserData'] = clean_last_user_data
|
|
1604
|
+
if is_open_hostEye is not None:
|
|
1605
|
+
body['isOpenHostEye'] = is_open_hostEye
|
|
1606
|
+
if sys_root_size is not None:
|
|
1607
|
+
body['sysRootSize'] = sys_root_size
|
|
1608
|
+
if is_preserve_data is not None:
|
|
1609
|
+
body['isPreserveData'] = is_preserve_data
|
|
1610
|
+
if raid_id is not None:
|
|
1611
|
+
body['raidId'] = raid_id
|
|
1612
|
+
if data_partition_type is not None:
|
|
1613
|
+
body['dataPartitionType'] = data_partition_type
|
|
1614
|
+
if root_partition_type is not None:
|
|
1615
|
+
body['rootPartitionType'] = root_partition_type
|
|
1564
1616
|
params = {
|
|
1565
1617
|
'rebuild': None
|
|
1566
1618
|
}
|
|
@@ -2602,12 +2654,17 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
2602
2654
|
def modify_volume_charge_type(self,
|
|
2603
2655
|
volume_id,
|
|
2604
2656
|
billing=None,
|
|
2657
|
+
effective_type=None,
|
|
2605
2658
|
config=None):
|
|
2606
2659
|
"""
|
|
2607
2660
|
:param volume_id: volume id
|
|
2608
2661
|
:type volume_id: string
|
|
2609
2662
|
:param billing: payment information
|
|
2610
2663
|
:type billing: bcc_model.Billing
|
|
2664
|
+
:param effective_type: Optional parameters:
|
|
2665
|
+
AtOnce (switch to pay-as-you-go immediately),
|
|
2666
|
+
AfterExpiration (switch to pay-as-you-go after expiration).
|
|
2667
|
+
Defaults to AfterExpiration if not provided.
|
|
2611
2668
|
:param config:
|
|
2612
2669
|
|
|
2613
2670
|
:return:
|
|
@@ -2619,6 +2676,7 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
2619
2676
|
if billing is None:
|
|
2620
2677
|
billing = default_billing_to_purchase_reserved
|
|
2621
2678
|
body = {
|
|
2679
|
+
'effectiveType': effective_type,
|
|
2622
2680
|
'billing': billing.__dict__
|
|
2623
2681
|
}
|
|
2624
2682
|
|
|
@@ -3999,7 +4057,8 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
3999
4057
|
user_data=None, spec_id=None, deletion_protection=None, is_open_hosteye=None,
|
|
4000
4058
|
hosteye_type=None, res_group_id=None, enable_ht=None, data_partition_type=None,
|
|
4001
4059
|
root_partition_type=None, file_systems=None, disable_root_disk_serial=None,
|
|
4002
|
-
internal_ips=None, network_purchase_type=None, is_keep_image_login=None
|
|
4060
|
+
internal_ips=None, network_purchase_type=None, is_keep_image_login=None,
|
|
4061
|
+
reserved_instance=None):
|
|
4003
4062
|
"""
|
|
4004
4063
|
Create a bcc Instance with the specified options.
|
|
4005
4064
|
You must fill the field of clientToken,which is especially for keeping idempotent.
|
|
@@ -4385,7 +4444,8 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
4385
4444
|
body['networkPurchaseType'] = network_purchase_type
|
|
4386
4445
|
if is_keep_image_login is not None:
|
|
4387
4446
|
body['keepImageLogin'] = is_keep_image_login
|
|
4388
|
-
|
|
4447
|
+
if reserved_instance is not None:
|
|
4448
|
+
body['reservedInstance'] = reserved_instance
|
|
4389
4449
|
return self._send_request(http_methods.POST, path, json.dumps(body),
|
|
4390
4450
|
params=params, config=config)
|
|
4391
4451
|
|
|
@@ -4432,7 +4492,8 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
4432
4492
|
@required(instance_id=(bytes, str)) # ***Unicode***
|
|
4433
4493
|
def release_instance_with_related_resources(self, instance_id, related_release_flag=None,
|
|
4434
4494
|
delete_cds_snapshot_flag=None, delete_related_enis_flag=None,
|
|
4435
|
-
bcc_recycle_flag=None,
|
|
4495
|
+
bcc_recycle_flag=None, cds_attribute_active=None,
|
|
4496
|
+
client_token=None, config=None):
|
|
4436
4497
|
"""
|
|
4437
4498
|
Releasing the instance owned by the user.
|
|
4438
4499
|
Only the Postpaid instance or Prepaid which is expired can be released.
|
|
@@ -4481,6 +4542,8 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
4481
4542
|
body['deleteRelatedEnisFlag'] = delete_related_enis_flag
|
|
4482
4543
|
if bcc_recycle_flag is not None:
|
|
4483
4544
|
body['bccRecycleFlag'] = bcc_recycle_flag
|
|
4545
|
+
if bcc_recycle_flag is not None:
|
|
4546
|
+
body['cdsAttributeActive'] = cds_attribute_active
|
|
4484
4547
|
return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
|
|
4485
4548
|
|
|
4486
4549
|
@required(instance_id=(bytes, str)) # ***Unicode***
|
|
@@ -5608,7 +5671,9 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
5608
5671
|
return self._send_request(http_methods.PUT, path, body=json.dumps(body), params=params, config=config)
|
|
5609
5672
|
|
|
5610
5673
|
def batch_rebuild_instances(self, image_id, admin_pass, instance_ids, keypair_id=None, is_keep_image_login=None,
|
|
5611
|
-
client_token=None, config=None
|
|
5674
|
+
client_token=None, config=None, user_data=None, use_last_user_data=None,
|
|
5675
|
+
is_open_hostEye=None, sys_root_size=None, is_preserve_data=None, raid_id=None,
|
|
5676
|
+
data_partition_type=None, root_partition_type=None):
|
|
5612
5677
|
"""
|
|
5613
5678
|
Batch rebuild instances.
|
|
5614
5679
|
|
|
@@ -5628,6 +5693,30 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
5628
5693
|
Set the id of the keypair to be bound. (optional param)
|
|
5629
5694
|
:type keypair_id: string
|
|
5630
5695
|
|
|
5696
|
+
:param user_data:
|
|
5697
|
+
UserData of the instance.
|
|
5698
|
+
|
|
5699
|
+
:param use_last_user_data:
|
|
5700
|
+
Use last user data.
|
|
5701
|
+
|
|
5702
|
+
:param is_open_hostEye:
|
|
5703
|
+
Is open host eye.
|
|
5704
|
+
|
|
5705
|
+
:param sys_root_size:
|
|
5706
|
+
System disk size.
|
|
5707
|
+
|
|
5708
|
+
:param is_preserve_data:
|
|
5709
|
+
Preserve data.
|
|
5710
|
+
|
|
5711
|
+
:param raid_id:
|
|
5712
|
+
Raid id.
|
|
5713
|
+
|
|
5714
|
+
:param data_partition_type:
|
|
5715
|
+
Data partition type.
|
|
5716
|
+
|
|
5717
|
+
:param root_partition_type:
|
|
5718
|
+
Root partition type.
|
|
5719
|
+
|
|
5631
5720
|
:return:
|
|
5632
5721
|
:rtype baidubce.bce_response.BceResponse
|
|
5633
5722
|
"""
|
|
@@ -5649,6 +5738,22 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
5649
5738
|
body['keypairId'] = keypair_id
|
|
5650
5739
|
if is_keep_image_login is not None:
|
|
5651
5740
|
body['keepImageLogin'] = is_keep_image_login
|
|
5741
|
+
if user_data is not None:
|
|
5742
|
+
body['userData'] = user_data
|
|
5743
|
+
if use_last_user_data is not None:
|
|
5744
|
+
body['useLastUserData'] = use_last_user_data
|
|
5745
|
+
if is_open_hostEye is not None:
|
|
5746
|
+
body['isOpenHostEye'] = is_open_hostEye
|
|
5747
|
+
if sys_root_size is not None:
|
|
5748
|
+
body['sysRootSize'] = sys_root_size
|
|
5749
|
+
if is_preserve_data is not None:
|
|
5750
|
+
body['isPreserveData'] = is_preserve_data
|
|
5751
|
+
if raid_id is not None:
|
|
5752
|
+
body['raidId'] = raid_id
|
|
5753
|
+
if data_partition_type is not None:
|
|
5754
|
+
body['dataPartitionType'] = data_partition_type
|
|
5755
|
+
if root_partition_type is not None:
|
|
5756
|
+
body['rootPartitionType'] = root_partition_type
|
|
5652
5757
|
return self._send_request(http_methods.PUT, path, body=json.dumps(body), params=params, config=config)
|
|
5653
5758
|
|
|
5654
5759
|
def change_to_prepaid(self, instance_id, duration, relation_cds, auto_renew, auto_renew_period=None,
|
|
@@ -5929,7 +6034,8 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
5929
6034
|
|
|
5930
6035
|
def batch_delete_instance_with_related_resource(self, instance_ids, related_release_flag=None,
|
|
5931
6036
|
delete_cds_snapshot_flag=None, delete_related_enis_flag=None,
|
|
5932
|
-
bcc_recycle_flag=None,
|
|
6037
|
+
bcc_recycle_flag=None, cds_attribute_active=None,
|
|
6038
|
+
client_token=None, config=None):
|
|
5933
6039
|
"""
|
|
5934
6040
|
batch delete instance with related resource
|
|
5935
6041
|
|
|
@@ -5974,6 +6080,8 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
5974
6080
|
body['deleteRelatedEnisFlag'] = delete_related_enis_flag
|
|
5975
6081
|
if bcc_recycle_flag is not None:
|
|
5976
6082
|
body['bccRecycleFlag'] = bcc_recycle_flag
|
|
6083
|
+
if bcc_recycle_flag is not None:
|
|
6084
|
+
body['cdsAttributeActive'] = cds_attribute_active
|
|
5977
6085
|
return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
|
|
5978
6086
|
|
|
5979
6087
|
def batch_start_instance(self, instance_ids, client_token=None, config=None):
|
|
@@ -70,11 +70,12 @@ class CreateCdsModel(object):
|
|
|
70
70
|
param: encryptKey
|
|
71
71
|
"""
|
|
72
72
|
|
|
73
|
-
def __init__(self, cdsSizeInGB=None, storageType='hp1', snapshotId=None, encryptKey=None):
|
|
73
|
+
def __init__(self, cdsSizeInGB=None, storageType='hp1', snapshotId=None, encryptKey=None, deleteWithInstance=None):
|
|
74
74
|
self.cdsSizeInGB = cdsSizeInGB
|
|
75
75
|
self.storageType = storageType
|
|
76
76
|
self.snapshotId = snapshotId
|
|
77
77
|
self.encryptKey = encryptKey
|
|
78
|
+
self.deleteWithInstance = deleteWithInstance
|
|
78
79
|
|
|
79
80
|
|
|
80
81
|
class SecurityGroupRuleModel(object):
|
|
@@ -64,7 +64,7 @@ class UploadTaskHandle:
|
|
|
64
64
|
handle to control multi upload file with multi-thread
|
|
65
65
|
"""
|
|
66
66
|
def __init__(self):
|
|
67
|
-
self.cancel_flag= False
|
|
67
|
+
self.cancel_flag = False
|
|
68
68
|
self.cancel_lock = threading.Lock()
|
|
69
69
|
|
|
70
70
|
def cancel(self):
|
|
@@ -956,12 +956,16 @@ class BosClient(BceBaseClient):
|
|
|
956
956
|
return True
|
|
957
957
|
|
|
958
958
|
@required(bucket_name=(bytes, str), key=(bytes, str))
|
|
959
|
-
def get_object(self, bucket_name, key, range=None, traffic_limit=None, version_id=None,
|
|
959
|
+
def get_object(self, bucket_name, key, range=None, traffic_limit=None, version_id=None,
|
|
960
|
+
cond_read_write=None, config=None):
|
|
960
961
|
"""
|
|
961
962
|
|
|
962
963
|
:param bucket_name:
|
|
963
964
|
:param key:
|
|
964
965
|
:param range:
|
|
966
|
+
:param traffic_limit:
|
|
967
|
+
:param version_id:
|
|
968
|
+
:param cond_read_write:
|
|
965
969
|
:param config:
|
|
966
970
|
:return:
|
|
967
971
|
"""
|
|
@@ -973,10 +977,17 @@ class BosClient(BceBaseClient):
|
|
|
973
977
|
if len(key) == 0 or key.startswith(b"/"):
|
|
974
978
|
raise BceClientError("Key can not be empty or start with '/' .")
|
|
975
979
|
range_header = BosClient._get_range_header_dict(range)
|
|
980
|
+
|
|
976
981
|
if traffic_limit is not None:
|
|
977
982
|
if range_header is None:
|
|
978
983
|
range_header = {}
|
|
979
984
|
range_header[http_headers.BOS_TRAFFIC_LIMIT] = traffic_limit
|
|
985
|
+
|
|
986
|
+
if cond_read_write is not None:
|
|
987
|
+
if range_header is None:
|
|
988
|
+
range_header = {}
|
|
989
|
+
range_header = self._get_cond_read_write_headers(http_methods.GET, range_header, cond_read_write)
|
|
990
|
+
|
|
980
991
|
return self._send_request(
|
|
981
992
|
http_methods.GET,
|
|
982
993
|
bucket_name,
|
|
@@ -985,7 +996,8 @@ class BosClient(BceBaseClient):
|
|
|
985
996
|
params=query_params,
|
|
986
997
|
config=config,
|
|
987
998
|
body_parser=BosClient._parse_bos_object)
|
|
988
|
-
|
|
999
|
+
|
|
1000
|
+
# restore object
|
|
989
1001
|
@required(bucket_name=(bytes, str), key=(bytes, str))
|
|
990
1002
|
def restore_object(self, bucket_name, key, days=None, tier="Standard", config=None):
|
|
991
1003
|
"""
|
|
@@ -1035,7 +1047,7 @@ class BosClient(BceBaseClient):
|
|
|
1035
1047
|
return True
|
|
1036
1048
|
|
|
1037
1049
|
@required(bucket_name=(bytes, str), key=(bytes, str))
|
|
1038
|
-
def get_object_as_string(self, bucket_name, key, range=None, version_id=None, config=None):
|
|
1050
|
+
def get_object_as_string(self, bucket_name, key, range=None, version_id=None, cond_read_write=None, config=None):
|
|
1039
1051
|
"""
|
|
1040
1052
|
|
|
1041
1053
|
:param bucket_name:
|
|
@@ -1045,14 +1057,15 @@ class BosClient(BceBaseClient):
|
|
|
1045
1057
|
:return:
|
|
1046
1058
|
"""
|
|
1047
1059
|
key = compat.convert_to_bytes(key)
|
|
1048
|
-
response = self.get_object(bucket_name, key, range=range, version_id = version_id,
|
|
1060
|
+
response = self.get_object(bucket_name, key, range=range, version_id = version_id,
|
|
1061
|
+
cond_read_write = cond_read_write, config=config)
|
|
1049
1062
|
s = response.data.read()
|
|
1050
1063
|
response.data.close()
|
|
1051
1064
|
return s
|
|
1052
1065
|
|
|
1053
1066
|
@required(bucket_name=(bytes, str), key=(bytes, str), file_name=(bytes, str))
|
|
1054
1067
|
def get_object_to_file(self, bucket_name, key, file_name, range=None, config=None,
|
|
1055
|
-
progress_callback=None, traffic_limit=None, version_id=None):
|
|
1068
|
+
progress_callback=None, traffic_limit=None, cond_read_write=None, version_id=None):
|
|
1056
1069
|
"""
|
|
1057
1070
|
Get Content of Object and Put Content to File
|
|
1058
1071
|
|
|
@@ -1084,6 +1097,11 @@ class BosClient(BceBaseClient):
|
|
|
1084
1097
|
range_header = {}
|
|
1085
1098
|
range_header[http_headers.BOS_TRAFFIC_LIMIT] = traffic_limit
|
|
1086
1099
|
|
|
1100
|
+
if cond_read_write is not None:
|
|
1101
|
+
if range_header is None:
|
|
1102
|
+
range_header = {}
|
|
1103
|
+
range_header = self._get_cond_read_write_headers(http_methods.GET, range_header, cond_read_write)
|
|
1104
|
+
|
|
1087
1105
|
return self._send_request(
|
|
1088
1106
|
http_methods.GET,
|
|
1089
1107
|
bucket_name,
|
|
@@ -1100,7 +1118,7 @@ class BosClient(BceBaseClient):
|
|
|
1100
1118
|
|
|
1101
1119
|
|
|
1102
1120
|
@required(bucket_name=(bytes, str), key=(bytes, str))
|
|
1103
|
-
def get_object_meta_data(self, bucket_name, key, version_id=None, config=None):
|
|
1121
|
+
def get_object_meta_data(self, bucket_name, key, version_id=None, cond_read_write=None, config=None):
|
|
1104
1122
|
"""
|
|
1105
1123
|
Get head of object
|
|
1106
1124
|
|
|
@@ -1116,9 +1134,14 @@ class BosClient(BceBaseClient):
|
|
|
1116
1134
|
if version_id is not None:
|
|
1117
1135
|
version_id = compat.convert_to_bytes(version_id)
|
|
1118
1136
|
query_params={b'versionId': version_id}
|
|
1137
|
+
|
|
1138
|
+
headers = {}
|
|
1139
|
+
if cond_read_write is not None:
|
|
1140
|
+
headers = self._get_cond_read_write_headers(http_methods.HEAD, headers, cond_read_write)
|
|
1141
|
+
|
|
1119
1142
|
key = compat.convert_to_bytes(key)
|
|
1120
1143
|
return self._send_request(http_methods.HEAD, bucket_name, key,
|
|
1121
|
-
|
|
1144
|
+
headers=headers, params=query_params, config=config)
|
|
1122
1145
|
|
|
1123
1146
|
@required(bucket_name=(bytes, str),
|
|
1124
1147
|
key=(bytes, str),
|
|
@@ -1251,6 +1274,7 @@ class BosClient(BceBaseClient):
|
|
|
1251
1274
|
progress_callback=None,
|
|
1252
1275
|
traffic_limit=None,
|
|
1253
1276
|
object_tagging=None,
|
|
1277
|
+
cond_read_write=None,
|
|
1254
1278
|
config=None):
|
|
1255
1279
|
"""
|
|
1256
1280
|
Put object and put content of file to the object
|
|
@@ -1283,6 +1307,9 @@ class BosClient(BceBaseClient):
|
|
|
1283
1307
|
traffic_limit=traffic_limit,
|
|
1284
1308
|
object_tagging=object_tagging,)
|
|
1285
1309
|
|
|
1310
|
+
if cond_read_write is not None:
|
|
1311
|
+
headers = self._get_cond_read_write_headers(http_methods.PUT, headers, cond_read_write)
|
|
1312
|
+
|
|
1286
1313
|
buf_size = self._get_config_parameter(config, 'recv_buf_size')
|
|
1287
1314
|
|
|
1288
1315
|
if content_length > bos.MAX_PUT_OBJECT_LENGTH:
|
|
@@ -1314,6 +1341,7 @@ class BosClient(BceBaseClient):
|
|
|
1314
1341
|
progress_callback=None,
|
|
1315
1342
|
traffic_limit=None,
|
|
1316
1343
|
object_tagging=None,
|
|
1344
|
+
cond_read_write=None,
|
|
1317
1345
|
config=None):
|
|
1318
1346
|
"""
|
|
1319
1347
|
Create object and put content of string to the object
|
|
@@ -1356,6 +1384,7 @@ class BosClient(BceBaseClient):
|
|
|
1356
1384
|
progress_callback = progress_callback,
|
|
1357
1385
|
traffic_limit=traffic_limit,
|
|
1358
1386
|
object_tagging=object_tagging,
|
|
1387
|
+
cond_read_write=cond_read_write,
|
|
1359
1388
|
config=config)
|
|
1360
1389
|
finally:
|
|
1361
1390
|
if fp is not None:
|
|
@@ -1376,6 +1405,7 @@ class BosClient(BceBaseClient):
|
|
|
1376
1405
|
progress_callback=None,
|
|
1377
1406
|
traffic_limit=None,
|
|
1378
1407
|
object_tagging=None,
|
|
1408
|
+
cond_read_write=None,
|
|
1379
1409
|
config=None,
|
|
1380
1410
|
):
|
|
1381
1411
|
|
|
@@ -1423,6 +1453,7 @@ class BosClient(BceBaseClient):
|
|
|
1423
1453
|
progress_callback=progress_callback,
|
|
1424
1454
|
traffic_limit=traffic_limit,
|
|
1425
1455
|
object_tagging=object_tagging,
|
|
1456
|
+
cond_read_write=cond_read_write,
|
|
1426
1457
|
config=config)
|
|
1427
1458
|
finally:
|
|
1428
1459
|
fp.close()
|
|
@@ -1805,8 +1836,9 @@ class BosClient(BceBaseClient):
|
|
|
1805
1836
|
part_list=list)
|
|
1806
1837
|
def complete_multipart_upload(self, bucket_name, key,
|
|
1807
1838
|
upload_id, part_list,
|
|
1808
|
-
user_metadata=None,
|
|
1809
1839
|
user_headers=None,
|
|
1840
|
+
user_metadata=None,
|
|
1841
|
+
cond_read_write=None,
|
|
1810
1842
|
config=None):
|
|
1811
1843
|
"""
|
|
1812
1844
|
After finish all the task, complete multi_upload_file.
|
|
@@ -1832,6 +1864,9 @@ class BosClient(BceBaseClient):
|
|
|
1832
1864
|
user_metadata=user_metadata,
|
|
1833
1865
|
user_headers=user_headers)
|
|
1834
1866
|
|
|
1867
|
+
if cond_read_write is not None:
|
|
1868
|
+
headers = self._get_cond_read_write_headers(http_methods.POST, headers, cond_read_write)
|
|
1869
|
+
|
|
1835
1870
|
return self._send_request(
|
|
1836
1871
|
http_methods.POST,
|
|
1837
1872
|
bucket_name,
|
|
@@ -2011,6 +2046,7 @@ class BosClient(BceBaseClient):
|
|
|
2011
2046
|
user_headers=None,
|
|
2012
2047
|
progress_callback=None,
|
|
2013
2048
|
traffic_limit=None,
|
|
2049
|
+
cond_read_write=None,
|
|
2014
2050
|
config=None):
|
|
2015
2051
|
"""
|
|
2016
2052
|
Multipart Upload file to bos
|
|
@@ -2066,7 +2102,7 @@ class BosClient(BceBaseClient):
|
|
|
2066
2102
|
# sort
|
|
2067
2103
|
part_list.sort(key=lambda x: x["partNumber"])
|
|
2068
2104
|
# complete_multipart_upload
|
|
2069
|
-
self.complete_multipart_upload(bucket_name, key, upload_id, part_list)
|
|
2105
|
+
self.complete_multipart_upload(bucket_name, key, upload_id, part_list, cond_read_write)
|
|
2070
2106
|
return True
|
|
2071
2107
|
|
|
2072
2108
|
@required(bucket_name=(bytes, str), key=(bytes, str), acl=(list, dict))
|
|
@@ -2890,6 +2926,37 @@ class BosClient(BceBaseClient):
|
|
|
2890
2926
|
|
|
2891
2927
|
if object_tagging is not None:
|
|
2892
2928
|
headers[http_headers.BOS_TAGGING] = compat.convert_to_bytes(object_tagging)
|
|
2929
|
+
|
|
2930
|
+
return headers
|
|
2931
|
+
|
|
2932
|
+
|
|
2933
|
+
@staticmethod
|
|
2934
|
+
def _get_cond_read_write_headers(http_method, headers, cond_read_write):
|
|
2935
|
+
"""
|
|
2936
|
+
get if condition headers
|
|
2937
|
+
:type http_method: string
|
|
2938
|
+
:param http_method: GET, HEAD, PUT, POST
|
|
2939
|
+
|
|
2940
|
+
:type cond_read_write: string
|
|
2941
|
+
:param cond_read_write: put_object, complete_multipart_upload, get_object, get_object_meta_data
|
|
2942
|
+
|
|
2943
|
+
:return: headers
|
|
2944
|
+
"""
|
|
2945
|
+
cond_read_write_set = http_headers.BOS_COND_READ_WRITE_HEADERS
|
|
2946
|
+
|
|
2947
|
+
if http_method == http_methods.GET or http_method == http_methods.HEAD:
|
|
2948
|
+
cond_read_write_set = cond_read_write_set.union(set(
|
|
2949
|
+
[http_headers.BOS_IF_MODIFIED_SINCE,
|
|
2950
|
+
http_headers.BOS_IF_UNMODIFIED_SINCE,
|
|
2951
|
+
http_headers.BOS_IF_MATCH,
|
|
2952
|
+
http_headers.BOS_IF_NONE_MATCH]))
|
|
2953
|
+
|
|
2954
|
+
for k, v in iteritems(cond_read_write):
|
|
2955
|
+
k = utils.convert_to_standard_string(k)
|
|
2956
|
+
if k in cond_read_write_set:
|
|
2957
|
+
headers[k] = v
|
|
2958
|
+
else:
|
|
2959
|
+
raise ValueError('%s is not valid in %s' % (k, http_method))
|
|
2893
2960
|
return headers
|
|
2894
2961
|
|
|
2895
2962
|
|
|
@@ -2995,6 +3062,19 @@ class BosClient(BceBaseClient):
|
|
|
2995
3062
|
|
|
2996
3063
|
return config.endpoint
|
|
2997
3064
|
|
|
3065
|
+
@staticmethod
|
|
3066
|
+
def _need_retry_for_bos(config, error):
|
|
3067
|
+
|
|
3068
|
+
if not isinstance(error, BceServerError):
|
|
3069
|
+
return False
|
|
3070
|
+
|
|
3071
|
+
# if you need add more retry condition, please add it here
|
|
3072
|
+
if error.status_code == http.client.FORBIDDEN:
|
|
3073
|
+
_logger.debug('BOS retry condition matched: 403 Forbidden')
|
|
3074
|
+
return True
|
|
3075
|
+
|
|
3076
|
+
return False
|
|
3077
|
+
|
|
2998
3078
|
@staticmethod
|
|
2999
3079
|
def _need_retry_backup_endpoint(error):
|
|
3000
3080
|
# always retry on IOError
|
|
@@ -3009,6 +3089,8 @@ class BosClient(BceBaseClient):
|
|
|
3009
3089
|
return True
|
|
3010
3090
|
if error.code == BceServerError.REQUEST_EXPIRED:
|
|
3011
3091
|
return True
|
|
3092
|
+
if error.status_code == http.client.FORBIDDEN:
|
|
3093
|
+
return True
|
|
3012
3094
|
return False
|
|
3013
3095
|
|
|
3014
3096
|
def _send_request(
|
|
@@ -3026,23 +3108,42 @@ class BosClient(BceBaseClient):
|
|
|
3026
3108
|
headers = headers or {}
|
|
3027
3109
|
headers[http_headers.STS_SECURITY_TOKEN] = config.security_token
|
|
3028
3110
|
|
|
3111
|
+
last_exception = None
|
|
3112
|
+
e = None
|
|
3029
3113
|
try:
|
|
3030
3114
|
return bce_http_client.send_request(
|
|
3031
3115
|
config, bce_v1_signer.sign, [handler.parse_error, body_parser],
|
|
3032
3116
|
http_method, path, body, headers, params)
|
|
3033
|
-
except BceHttpClientError as
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3117
|
+
except BceHttpClientError as ex:
|
|
3118
|
+
last_exception = ex
|
|
3119
|
+
e = ex
|
|
3120
|
+
|
|
3121
|
+
# retry backup endpoint
|
|
3122
|
+
if e is not None and config.backup_endpoint is not None and BosClient._need_retry_backup_endpoint(e):
|
|
3123
|
+
try:
|
|
3124
|
+
_logger.debug(b'Retry for backup endpoint error code: %d.', e.status_code)
|
|
3039
3125
|
path = BosClient._get_path(config, bucket_name, key, True)
|
|
3040
|
-
return bce_http_client.
|
|
3126
|
+
return bce_http_client.send_request(
|
|
3041
3127
|
config, bce_v1_signer.sign, [handler.parse_error, body_parser],
|
|
3042
3128
|
http_method, path, body, headers, params, True)
|
|
3043
|
-
|
|
3044
|
-
|
|
3129
|
+
except BceHttpClientError as ex:
|
|
3130
|
+
last_exception = ex
|
|
3131
|
+
e = ex
|
|
3132
|
+
|
|
3133
|
+
# retry for bos error
|
|
3134
|
+
if e is not None and BosClient._need_retry_for_bos(config, e.last_error):
|
|
3135
|
+
try:
|
|
3136
|
+
_logger.debug(b'Retry for BOS error code: %d.', e.status_code)
|
|
3137
|
+
return bce_http_client.send_request(
|
|
3138
|
+
config, bce_v1_signer.sign, [handler.parse_error, body_parser],
|
|
3139
|
+
http_method, path, body, headers, params)
|
|
3140
|
+
except BceHttpClientError as ex:
|
|
3141
|
+
last_exception = ex
|
|
3142
|
+
e = ex
|
|
3045
3143
|
|
|
3144
|
+
if last_exception is None:
|
|
3145
|
+
raise
|
|
3146
|
+
raise last_exception
|
|
3046
3147
|
|
|
3047
3148
|
class SelectMessage(object):
|
|
3048
3149
|
"""
|
|
@@ -3137,7 +3238,7 @@ class SelectResponse(object):
|
|
|
3137
3238
|
msg.set_end_message(headers_map, crc)
|
|
3138
3239
|
self.finish = True
|
|
3139
3240
|
yield msg
|
|
3140
|
-
|
|
3241
|
+
return
|
|
3141
3242
|
finally:
|
|
3142
3243
|
self.http_response.close()
|
|
3143
3244
|
|
|
@@ -263,7 +263,6 @@ class EsgClient(bce_base_client.BceBaseClient):
|
|
|
263
263
|
enterprise_security_group_rule_id = compat.convert_to_bytes(enterprise_security_group_rule_id)
|
|
264
264
|
path = b'/enterprise/security/rule/%s' % enterprise_security_group_rule_id
|
|
265
265
|
body = {
|
|
266
|
-
'enterpriseSecurityGroupRuleId': enterprise_security_group_rule_id,
|
|
267
266
|
'remark': remark,
|
|
268
267
|
'protocol': protocol,
|
|
269
268
|
'portRange': portrange,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|