bce-python-sdk 0.9.2__tar.gz → 0.9.4__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.2 → bce-python-sdk-0.9.4}/PKG-INFO +1 -1
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/__init__.py +1 -1
- bce-python-sdk-0.9.4/baidubce/services/autoscaling/as_client.py +653 -0
- bce-python-sdk-0.9.4/baidubce/services/autoscaling/as_handler.py +84 -0
- bce-python-sdk-0.9.4/baidubce/services/autoscaling/as_model.py +256 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bcc/bcc_client.py +49 -0
- bce-python-sdk-0.9.4/baidubce/services/bcm/bcm_client.py +5634 -0
- bce-python-sdk-0.9.4/baidubce/services/bcm/bcm_handler.py +84 -0
- bce-python-sdk-0.9.4/baidubce/services/bcm/bcm_model.py +743 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/blb/app_blb_client.py +1 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/blb/blb_client.py +1 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/blb/user_service_client.py +1 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/et/et_client.py +2 -2
- bce-python-sdk-0.9.4/baidubce/services/vpn/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/bce_python_sdk.egg-info/PKG-INFO +1 -1
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/bce_python_sdk.egg-info/SOURCES.txt +6 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/setup.py +1 -0
- bce-python-sdk-0.9.2/baidubce/services/bcm/bcm_client.py +0 -198
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/README.txt +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/auth/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/auth/bce_credentials.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/auth/bce_v1_signer.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/bce_base_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/bce_client_configuration.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/bce_response.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/compat.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/exception.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/http/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/http/bce_http_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/http/handler.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/http/http_content_types.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/http/http_headers.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/http/http_methods.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/protocol.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/region.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/retry/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/retry/retry_policy.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/__init__.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/bbc → bce-python-sdk-0.9.4/baidubce/services/autoscaling}/__init__.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/bcc → bce-python-sdk-0.9.4/baidubce/services/bbc}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bbc/bbc_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bbc/bbc_model.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/bcm → bce-python-sdk-0.9.4/baidubce/services/bcc}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bcc/bcc_model.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bcc/fpga_card_type.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bcc/gpu_card_type.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/bes → bce-python-sdk-0.9.4/baidubce/services/bcm}/__init__.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/blb → bce-python-sdk-0.9.4/baidubce/services/bes}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bes/bes_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bes/bes_model.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/bmr → bce-python-sdk-0.9.4/baidubce/services/blb}/__init__.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/cdn → bce-python-sdk-0.9.4/baidubce/services/bmr}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bmr/bmr_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bos/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bos/bos_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bos/bos_handler.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bos/canned_acl.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bos/storage_class.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bts/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bts/bts_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bts/model.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/bts/util.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/cert → bce-python-sdk-0.9.4/baidubce/services/cdn}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/cdn/cdn_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/cdn/cdn_stats_param.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/cfc → bce-python-sdk-0.9.4/baidubce/services/cert}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/cert/cert_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/cert/cert_model.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/csn → bce-python-sdk-0.9.4/baidubce/services/cfc}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/cfc/cfc_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/cfc/cfc_handler.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/cfc/models.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/ddc → bce-python-sdk-0.9.4/baidubce/services/csn}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/csn/csn_api.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/csn/csn_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/csn/csn_model.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/dns → bce-python-sdk-0.9.4/baidubce/services/ddc}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/ddc/ddc_client.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/dns/api → bce-python-sdk-0.9.4/baidubce/services/dns}/__init__.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/dumap → bce-python-sdk-0.9.4/baidubce/services/dns/api}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/dns/api/dns_api.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/dns/dns_client.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/eip → bce-python-sdk-0.9.4/baidubce/services/dumap}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/dumap/dumap_client.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/endpoint → bce-python-sdk-0.9.4/baidubce/services/eip}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/eip/eip_bp_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/eip/eip_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/eip/eip_group_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/eip/eip_group_model.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/eip/eip_tp_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/eip/model.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/eni → bce-python-sdk-0.9.4/baidubce/services/endpoint}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/endpoint/endpoint_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/endpoint/model.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/et → bce-python-sdk-0.9.4/baidubce/services/eni}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/eni/eni_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/eni/eni_model.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/ipv6gateway → bce-python-sdk-0.9.4/baidubce/services/et}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/et/model.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/havip/havip_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/iam/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/iam/iam_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/infinite/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/infinite/infinite_client.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/kms → bce-python-sdk-0.9.4/baidubce/services/ipv6gateway}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/ipv6gateway/ipv6gateway_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/ipv6gateway/ipv6gateway_model.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/lbdc → bce-python-sdk-0.9.4/baidubce/services/kms}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/kms/keyspec_class.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/kms/kms_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/kms/origin_class.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/kms/protectedby_class.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/kms/publickeyencoding_class.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/localdns → bce-python-sdk-0.9.4/baidubce/services/lbdc}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/lbdc/lbdc_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/lbdc/model.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/localdns/api → bce-python-sdk-0.9.4/baidubce/services/localdns}/__init__.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/media → bce-python-sdk-0.9.4/baidubce/services/localdns/api}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/localdns/api/ld_api.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/localdns/ld_client.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/oos → bce-python-sdk-0.9.4/baidubce/services/media}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/media/media_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/media/media_handler.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/mms/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/mms/mms_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/mvs/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/mvs/mvs_client.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/route → bce-python-sdk-0.9.4/baidubce/services/oos}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/oos/oos_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/oos/oos_model.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/rds_backup_manager.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/rds_database_manager.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/rds_hot_active_instance_group_manager.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/rds_http.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/rds_instance_manager.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/rds_log_manager.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/rds_parameter_manager.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/rds_readonly_group_manager.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/rds_recycler_manager.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/rds_security_manager.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/rds_task_manager.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/rds/rds_users_manager.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/subnet → bce-python-sdk-0.9.4/baidubce/services/route}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/route/route_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/route/route_model.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/scs/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/scs/model.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/scs/scs_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/sms/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/sms/model.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/sms/sms_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/sts/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/sts/sts_client.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/tsdb → bce-python-sdk-0.9.4/baidubce/services/subnet}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/subnet/subnet_client.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/vca → bce-python-sdk-0.9.4/baidubce/services/tsdb}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/tsdb/tsdb_admin_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/tsdb/tsdb_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/tsdb/tsdb_handler.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/vcr → bce-python-sdk-0.9.4/baidubce/services/vca}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/vca/vca_client.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/vpc → bce-python-sdk-0.9.4/baidubce/services/vcr}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/vcr/vcr_client.py +0 -0
- {bce-python-sdk-0.9.2/baidubce/services/vpn → bce-python-sdk-0.9.4/baidubce/services/vpc}/__init__.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/vpc/acl_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/vpc/nat_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/vpc/nat_model.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/vpc/peerconn_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/vpc/peerconn_model.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/vpc/vpc_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/vpn/vpn_client.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/services/vpn/vpn_model.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/baidubce/utils.py +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/bce_python_sdk.egg-info/dependency_links.txt +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/bce_python_sdk.egg-info/requires.txt +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/bce_python_sdk.egg-info/top_level.txt +0 -0
- {bce-python-sdk-0.9.2 → bce-python-sdk-0.9.4}/setup.cfg +0 -0
|
@@ -0,0 +1,653 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This module provides a client class for AS.
|
|
3
|
+
"""
|
|
4
|
+
import copy
|
|
5
|
+
import json
|
|
6
|
+
import uuid
|
|
7
|
+
|
|
8
|
+
from baidubce import bce_base_client, compat
|
|
9
|
+
from baidubce.auth import bce_v1_signer
|
|
10
|
+
from baidubce.http import handler, bce_http_client, http_methods
|
|
11
|
+
from baidubce.services.autoscaling import as_handler
|
|
12
|
+
from baidubce.utils import required
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class AsClient(bce_base_client.BceBaseClient):
|
|
16
|
+
"""
|
|
17
|
+
AS base sdk client
|
|
18
|
+
"""
|
|
19
|
+
version = b'/v1'
|
|
20
|
+
|
|
21
|
+
content_type_header_key = b"content-type"
|
|
22
|
+
content_type_header_value = b"application/json;charset=UTF-8"
|
|
23
|
+
request_id_header_key = b"x-bce-request-id"
|
|
24
|
+
|
|
25
|
+
def __init__(self, config=None):
|
|
26
|
+
bce_base_client.BceBaseClient.__init__(self, config)
|
|
27
|
+
|
|
28
|
+
def _merge_config(self, config=None):
|
|
29
|
+
if config is None:
|
|
30
|
+
return self.config
|
|
31
|
+
else:
|
|
32
|
+
new_config = copy.copy(self.config)
|
|
33
|
+
new_config.merge_non_none_values(config)
|
|
34
|
+
return new_config
|
|
35
|
+
|
|
36
|
+
def _send_request(self, http_method, path,
|
|
37
|
+
body=None, headers=None, params=None, config=None, body_parser=None):
|
|
38
|
+
config = self._merge_config(config)
|
|
39
|
+
if body_parser is None:
|
|
40
|
+
body_parser = handler.parse_json
|
|
41
|
+
if headers is None:
|
|
42
|
+
headers = {}
|
|
43
|
+
if self.content_type_header_key not in headers:
|
|
44
|
+
headers[self.content_type_header_key] = self.content_type_header_value
|
|
45
|
+
if self.request_id_header_key not in headers:
|
|
46
|
+
headers[self.request_id_header_key] = uuid.uuid4()
|
|
47
|
+
|
|
48
|
+
return bce_http_client.send_request(
|
|
49
|
+
config, bce_v1_signer.sign, [as_handler.parse_error, body_parser],
|
|
50
|
+
http_method, AsClient.version + path, body, headers, params)
|
|
51
|
+
|
|
52
|
+
def get_as_group_list(self, page_no=1, page_size=1000, keyword=None, keyword_type=None, order=None, order_by=None):
|
|
53
|
+
"""
|
|
54
|
+
Get autoscaling group list
|
|
55
|
+
:param page_no:
|
|
56
|
+
page_no
|
|
57
|
+
:type page_no: int
|
|
58
|
+
|
|
59
|
+
:param keyword:
|
|
60
|
+
query keyword
|
|
61
|
+
:type keyword: string
|
|
62
|
+
|
|
63
|
+
:param keyword_type:
|
|
64
|
+
query keyword type
|
|
65
|
+
:type keyword_type: string
|
|
66
|
+
|
|
67
|
+
:param order:
|
|
68
|
+
order-ascending order or descending order
|
|
69
|
+
:type order: string
|
|
70
|
+
|
|
71
|
+
:param order_by:
|
|
72
|
+
order by param
|
|
73
|
+
:type order_by:
|
|
74
|
+
|
|
75
|
+
:return:
|
|
76
|
+
:rtype baidubce.bce_response.BceResponse
|
|
77
|
+
"""
|
|
78
|
+
params = {
|
|
79
|
+
b'keyword': keyword,
|
|
80
|
+
b'keywordType': keyword_type,
|
|
81
|
+
b'order': order,
|
|
82
|
+
b'orderBy': order_by,
|
|
83
|
+
b'pageNo': page_no,
|
|
84
|
+
b'pageSize': page_size,
|
|
85
|
+
}
|
|
86
|
+
path = b'/group'
|
|
87
|
+
return self._send_request(http_methods.GET, path, params=params)
|
|
88
|
+
|
|
89
|
+
def get_as_group_detail(self, group_id):
|
|
90
|
+
"""
|
|
91
|
+
Get autoscaling group detail
|
|
92
|
+
:param group_id:
|
|
93
|
+
autoscaling group_id
|
|
94
|
+
:type group_id: string
|
|
95
|
+
:return:
|
|
96
|
+
:rtype baidubce.bce_response.BceResponse
|
|
97
|
+
"""
|
|
98
|
+
if len(group_id) <= 0:
|
|
99
|
+
raise ValueError('group_id should not be none or empty string')
|
|
100
|
+
group_id = compat.convert_to_bytes(group_id)
|
|
101
|
+
path = b'/group/%s' % group_id
|
|
102
|
+
return self._send_request(http_methods.GET, path)
|
|
103
|
+
|
|
104
|
+
def get_as_group_node_list(self, group_id, page_no=1, page_size=1000, keyword=None, keyword_type=None, order=None,
|
|
105
|
+
order_by=None):
|
|
106
|
+
"""
|
|
107
|
+
Get autoscaling group node list
|
|
108
|
+
|
|
109
|
+
:param group_id:
|
|
110
|
+
autoscaling group_id
|
|
111
|
+
:type group_id: string
|
|
112
|
+
|
|
113
|
+
:param page_no:
|
|
114
|
+
page_no
|
|
115
|
+
:type page_no: int
|
|
116
|
+
|
|
117
|
+
:param keyword:
|
|
118
|
+
query keyword
|
|
119
|
+
:type keyword: string
|
|
120
|
+
|
|
121
|
+
:param keyword_type:
|
|
122
|
+
query keyword type
|
|
123
|
+
:type keyword_type: string
|
|
124
|
+
|
|
125
|
+
:param order:
|
|
126
|
+
order-ascending order or descending order
|
|
127
|
+
:type order: string
|
|
128
|
+
|
|
129
|
+
:param order_by:
|
|
130
|
+
order by param
|
|
131
|
+
:type order_by:
|
|
132
|
+
|
|
133
|
+
:return:
|
|
134
|
+
:rtype baidubce.bce_response.BceResponse
|
|
135
|
+
"""
|
|
136
|
+
if len(group_id) <= 0:
|
|
137
|
+
raise ValueError('group_id should not be none or empty string')
|
|
138
|
+
params = {
|
|
139
|
+
b'groupid': group_id,
|
|
140
|
+
b'keyword': keyword,
|
|
141
|
+
b'keywordType': keyword_type,
|
|
142
|
+
b'order': order,
|
|
143
|
+
b'orderBy': order_by,
|
|
144
|
+
b'pageNo': page_no,
|
|
145
|
+
b'pageSize': page_size,
|
|
146
|
+
}
|
|
147
|
+
path = b'/node'
|
|
148
|
+
return self._send_request(http_methods.GET, path, params=params)
|
|
149
|
+
|
|
150
|
+
def delete_group(self, group_ids):
|
|
151
|
+
"""
|
|
152
|
+
Get autoscaling group node list
|
|
153
|
+
|
|
154
|
+
:param group_ids:
|
|
155
|
+
autoscaling group_ids
|
|
156
|
+
:type group_ids: list of strings
|
|
157
|
+
"""
|
|
158
|
+
if len(group_ids) <= 0:
|
|
159
|
+
raise ValueError('group_id should not be none or empty string')
|
|
160
|
+
path = b'/group/delete'
|
|
161
|
+
body = {
|
|
162
|
+
"groupIds": group_ids
|
|
163
|
+
}
|
|
164
|
+
return self._send_request(http_methods.POST, path, body=json.dumps(body))
|
|
165
|
+
|
|
166
|
+
def create_group(self, group_name=None, config=None, health_check=None, blb=None, rds=None, scs=None,
|
|
167
|
+
shrinkage_strategy=None, zone_infos=None, assign_tag_info=None, node_list=None,
|
|
168
|
+
eip=None, billing=None, cmd_config=None, bcc_name_config=None):
|
|
169
|
+
"""
|
|
170
|
+
Create autoscaling group
|
|
171
|
+
|
|
172
|
+
:param group_name:
|
|
173
|
+
autoscaling group_name
|
|
174
|
+
:type group_name: string
|
|
175
|
+
|
|
176
|
+
:param config:
|
|
177
|
+
autoscaling group config
|
|
178
|
+
:type config: dict
|
|
179
|
+
|
|
180
|
+
:param health_check:
|
|
181
|
+
autoscaling group health check info
|
|
182
|
+
:type health_check: dict
|
|
183
|
+
|
|
184
|
+
:param blb:
|
|
185
|
+
blb info
|
|
186
|
+
:type blb: list of strings
|
|
187
|
+
|
|
188
|
+
:param rds:
|
|
189
|
+
rds info
|
|
190
|
+
:type rds: list of strings
|
|
191
|
+
|
|
192
|
+
:param scs:
|
|
193
|
+
scs info
|
|
194
|
+
:type scs: list of strings
|
|
195
|
+
|
|
196
|
+
:param shrinkage_strategy:
|
|
197
|
+
autoscaling group shrinkage strategy
|
|
198
|
+
:type shrinkage_strategy: string
|
|
199
|
+
|
|
200
|
+
:param zone_info:
|
|
201
|
+
autoscaling group zone info
|
|
202
|
+
:type zone_info: dict
|
|
203
|
+
|
|
204
|
+
:param assign_tag_info:
|
|
205
|
+
autoscaling group tag info
|
|
206
|
+
:type assign_tag_info: dict
|
|
207
|
+
|
|
208
|
+
:param nodes:
|
|
209
|
+
autoscaling group nodes
|
|
210
|
+
:type nodes: dict
|
|
211
|
+
|
|
212
|
+
:param eip:
|
|
213
|
+
autoscaling group eip info
|
|
214
|
+
:type eip: dict
|
|
215
|
+
|
|
216
|
+
:param billing:
|
|
217
|
+
autoscaling group billing info
|
|
218
|
+
:type billing: dict
|
|
219
|
+
|
|
220
|
+
:param cmd_config:
|
|
221
|
+
autoscaling group cmd config
|
|
222
|
+
:type cmd_config: dict
|
|
223
|
+
|
|
224
|
+
:param bcc_name_config:
|
|
225
|
+
autoscaling group bcc name config
|
|
226
|
+
:type bcc_name_config: dict
|
|
227
|
+
|
|
228
|
+
:return:
|
|
229
|
+
:rtype baidubce.bce_response.BceResponse
|
|
230
|
+
"""
|
|
231
|
+
|
|
232
|
+
path = b'/group'
|
|
233
|
+
body = {
|
|
234
|
+
'groupName': group_name,
|
|
235
|
+
'config': config,
|
|
236
|
+
'healthCheck': health_check,
|
|
237
|
+
'blb': blb,
|
|
238
|
+
'rds': rds,
|
|
239
|
+
'scs': scs,
|
|
240
|
+
'shrinkageStrategy': shrinkage_strategy,
|
|
241
|
+
'zoneInfo': zone_infos,
|
|
242
|
+
'assignTagInfo': assign_tag_info,
|
|
243
|
+
'nodes': node_list,
|
|
244
|
+
'eip': eip,
|
|
245
|
+
'billing': billing,
|
|
246
|
+
'cmdConfig': cmd_config,
|
|
247
|
+
'bccNameConfig': bcc_name_config
|
|
248
|
+
}
|
|
249
|
+
return self._send_request(http_methods.POST, path, body=json.dumps(body))
|
|
250
|
+
|
|
251
|
+
@required(group_id=str, nodes=list)
|
|
252
|
+
def detach_node(self, group_id, nodes):
|
|
253
|
+
"""
|
|
254
|
+
Detach nodes from group
|
|
255
|
+
:param group_id: the id of group
|
|
256
|
+
:type group_id: string
|
|
257
|
+
:param nodes: the list of node
|
|
258
|
+
:type nodes: list
|
|
259
|
+
:return: the result of detach node
|
|
260
|
+
:rtype: dict
|
|
261
|
+
"""
|
|
262
|
+
path = b'/group/%s' % compat.convert_to_bytes(group_id)
|
|
263
|
+
params = {
|
|
264
|
+
"detachNode": ""
|
|
265
|
+
}
|
|
266
|
+
body = {
|
|
267
|
+
"nodes": nodes
|
|
268
|
+
}
|
|
269
|
+
return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params)
|
|
270
|
+
|
|
271
|
+
@required(rule_name=str, group_id=str, state=str, rule_type=str, action_type=str, action_num=int,
|
|
272
|
+
cooldown_in_sec=int)
|
|
273
|
+
def create_rule(self, rule_name, group_id, state, rule_type, action_type, action_num, cooldown_in_sec,
|
|
274
|
+
target_type="", target_id="", indicator="", threshold="0", unit="",
|
|
275
|
+
comparison_operator="", cron_time="", period_type=None, period_value=None,
|
|
276
|
+
period_start_time=None, period_end_time=None):
|
|
277
|
+
|
|
278
|
+
"""
|
|
279
|
+
Create rule
|
|
280
|
+
:param rule_name: the name of the rule
|
|
281
|
+
:type rule_name: string
|
|
282
|
+
:param group_id: the id of the group
|
|
283
|
+
:type group_id: string
|
|
284
|
+
:param state: the state of the rule, can be "ENABLE" or "DISABLE"
|
|
285
|
+
:type state: string
|
|
286
|
+
:param rule_type: the type of the rule, can be "ALARM", "CRONTAB", or "PERIOD"
|
|
287
|
+
:type rule_type: string
|
|
288
|
+
:param target_type: the type of the target
|
|
289
|
+
:type target_type: string
|
|
290
|
+
:param target_id: the id of the target
|
|
291
|
+
:type target_id: string
|
|
292
|
+
:param indicator: the indicator of the rule
|
|
293
|
+
:type indicator: string
|
|
294
|
+
:param threshold: the threshold of the rule
|
|
295
|
+
:type threshold: string
|
|
296
|
+
:param unit: the unit of the threshold
|
|
297
|
+
:type unit: string
|
|
298
|
+
:param comparison_operator: the comparison operator of the rule
|
|
299
|
+
:type comparison_operator: string
|
|
300
|
+
:param action_type: the action type of the rule, can be INCREASE, DECREASE, ADJUST
|
|
301
|
+
:type action_type: string
|
|
302
|
+
:param action_num: the number of actions to be performed
|
|
303
|
+
:type action_num: int
|
|
304
|
+
:param cron_time: the cron time of the rule
|
|
305
|
+
:type cron_time: string
|
|
306
|
+
:param cooldown_in_sec: the cooldown time in seconds
|
|
307
|
+
:type cooldown_in_sec: int
|
|
308
|
+
:param period_type: the period type of the rule
|
|
309
|
+
:type period_type: string
|
|
310
|
+
:param period_value: the period value of the rule
|
|
311
|
+
:type period_value: int
|
|
312
|
+
:param period_start_time: the start time of the period
|
|
313
|
+
:type period_start_time: string
|
|
314
|
+
:param period_end_time: the end time of the period
|
|
315
|
+
:type period_end_time: string
|
|
316
|
+
"""
|
|
317
|
+
path = b'/rule'
|
|
318
|
+
body = {
|
|
319
|
+
"ruleName": rule_name,
|
|
320
|
+
"groupId": group_id,
|
|
321
|
+
"state": state,
|
|
322
|
+
"type": rule_type,
|
|
323
|
+
"targetType": target_type,
|
|
324
|
+
"targetId": target_id,
|
|
325
|
+
"indicator": indicator,
|
|
326
|
+
"threshold": threshold,
|
|
327
|
+
"unit": unit,
|
|
328
|
+
"comparisonOperator": comparison_operator,
|
|
329
|
+
"actionType": action_type,
|
|
330
|
+
"actionNum": action_num,
|
|
331
|
+
"cronTime": cron_time,
|
|
332
|
+
"cooldownInSec": cooldown_in_sec,
|
|
333
|
+
"periodType": period_type,
|
|
334
|
+
"periodValue": period_value,
|
|
335
|
+
"periodStartTime": period_start_time,
|
|
336
|
+
"periodEndTime": period_end_time
|
|
337
|
+
}
|
|
338
|
+
return self._send_request(http_methods.POST, path, body=json.dumps(body))
|
|
339
|
+
|
|
340
|
+
@required(rule_id=str, rule_name=str, group_id=str, state=str, rule_type=str, action_type=str, action_num=int,
|
|
341
|
+
cooldown_in_sec=int)
|
|
342
|
+
def update_rule(self, rule_id, rule_name, group_id, state, rule_type, action_type, action_num, cooldown_in_sec,
|
|
343
|
+
target_type="", target_id="", indicator="", threshold="0", unit="",
|
|
344
|
+
comparison_operator="", cron_time="", period_type=None, period_value=None,
|
|
345
|
+
period_start_time=None, period_end_time=None):
|
|
346
|
+
"""
|
|
347
|
+
Update rule
|
|
348
|
+
:param rule_id: the id of the rule
|
|
349
|
+
:type rule_id: string
|
|
350
|
+
:param rule_name: the name of the rule
|
|
351
|
+
:type rule_name: string
|
|
352
|
+
:param group_id: the id of the group
|
|
353
|
+
:type group_id: string
|
|
354
|
+
:param state: the state of the rule, can be "ENABLE" or "DISABLE"
|
|
355
|
+
:type state: string
|
|
356
|
+
:param rule_type: the type of the rule, can be "ALARM", "CRONTAB", or "PERIOD"
|
|
357
|
+
:type rule_type: string
|
|
358
|
+
:param target_type: the type of the target
|
|
359
|
+
:type target_type: string
|
|
360
|
+
:param target_id: the id of the target
|
|
361
|
+
:type target_id: string
|
|
362
|
+
:param indicator: the indicator of the rule
|
|
363
|
+
:type indicator: string
|
|
364
|
+
:param threshold: the threshold of the rule
|
|
365
|
+
:type threshold: string
|
|
366
|
+
:param unit: the unit of the threshold
|
|
367
|
+
:type unit: string
|
|
368
|
+
:param comparison_operator: the comparison operator of the rule
|
|
369
|
+
:type comparison_operator: string
|
|
370
|
+
:param action_type: the action type of the rule, can be INCREASE, DECREASE, ADJUST
|
|
371
|
+
:type action_type: string
|
|
372
|
+
:param action_num: the number of actions to be performed
|
|
373
|
+
:type action_num: int
|
|
374
|
+
:param cron_time: the cron time of the rule
|
|
375
|
+
:type cron_time: string
|
|
376
|
+
:param cooldown_in_sec: the cooldown time in seconds
|
|
377
|
+
:type cooldown_in_sec: int
|
|
378
|
+
:param period_type: the period type of the rule
|
|
379
|
+
:type period_type: string
|
|
380
|
+
:param period_value: the period value of the rule
|
|
381
|
+
:type period_value: int
|
|
382
|
+
:param period_start_time: the start time of the period
|
|
383
|
+
:type period_start_time: string
|
|
384
|
+
:param period_end_time: the end time of the period
|
|
385
|
+
:type period_end_time: string
|
|
386
|
+
"""
|
|
387
|
+
path = b'/rule/%s' % compat.convert_to_bytes(rule_id)
|
|
388
|
+
body = {
|
|
389
|
+
"ruleName": rule_name,
|
|
390
|
+
"groupId": group_id,
|
|
391
|
+
"state": state,
|
|
392
|
+
"type": rule_type,
|
|
393
|
+
"targetType": target_type,
|
|
394
|
+
"targetId": target_id,
|
|
395
|
+
"indicator": indicator,
|
|
396
|
+
"threshold": threshold,
|
|
397
|
+
"unit": unit,
|
|
398
|
+
"comparisonOperator": comparison_operator,
|
|
399
|
+
"actionType": action_type,
|
|
400
|
+
"actionNum": action_num,
|
|
401
|
+
"cronTime": cron_time,
|
|
402
|
+
"cooldownInSec": cooldown_in_sec,
|
|
403
|
+
"periodType": period_type,
|
|
404
|
+
"periodValue": period_value,
|
|
405
|
+
"periodStartTime": period_start_time,
|
|
406
|
+
"periodEndTime": period_end_time
|
|
407
|
+
}
|
|
408
|
+
return self._send_request(http_methods.PUT, path, body=json.dumps(body))
|
|
409
|
+
|
|
410
|
+
@required(rule_id=str)
|
|
411
|
+
def get_rule(self, rule_id):
|
|
412
|
+
"""
|
|
413
|
+
Get rule
|
|
414
|
+
:param rule_id: the id of the rule
|
|
415
|
+
:type rule_id: string
|
|
416
|
+
:return: the result of get rule
|
|
417
|
+
:rtype: dict
|
|
418
|
+
"""
|
|
419
|
+
path = b'/rule/%s' % compat.convert_to_bytes(rule_id)
|
|
420
|
+
return self._send_request(http_methods.GET, path)
|
|
421
|
+
|
|
422
|
+
@required(group_id=str)
|
|
423
|
+
def list_rule(self, group_id, keyword="", keyword_type="", order="desc", order_by="createTime", page_no=1,
|
|
424
|
+
page_size=1000):
|
|
425
|
+
"""
|
|
426
|
+
Query rule list
|
|
427
|
+
:param group_id: the id of the group
|
|
428
|
+
:type group_id: string
|
|
429
|
+
:param keyword: the keyword of the rule
|
|
430
|
+
:type keyword: string
|
|
431
|
+
:param keyword_type: the type of the keyword
|
|
432
|
+
:type keyword_type: string
|
|
433
|
+
:param order: the order of the rule
|
|
434
|
+
:type order: string
|
|
435
|
+
:param order_by: the order by of the rule
|
|
436
|
+
:type order_by: string
|
|
437
|
+
:param page_no: the page number
|
|
438
|
+
:type page_no: int
|
|
439
|
+
:param page_size: the page size
|
|
440
|
+
:type page_size: int
|
|
441
|
+
"""
|
|
442
|
+
path = b'/rule'
|
|
443
|
+
params = {
|
|
444
|
+
"groupid": group_id,
|
|
445
|
+
"keyword": keyword,
|
|
446
|
+
"keywordType": keyword_type,
|
|
447
|
+
"order": order,
|
|
448
|
+
"orderBy": order_by,
|
|
449
|
+
"pageNo": page_no,
|
|
450
|
+
"pageSize": page_size
|
|
451
|
+
}
|
|
452
|
+
return self._send_request(http_methods.GET, path, params=params)
|
|
453
|
+
|
|
454
|
+
def delete_rule(self, rule_ids=None, group_ids=None):
|
|
455
|
+
"""
|
|
456
|
+
Delete rule
|
|
457
|
+
:param rule_ids: the list of rule id
|
|
458
|
+
:type rule_ids: list
|
|
459
|
+
:param group_ids: the list of group id
|
|
460
|
+
:type group_ids: list
|
|
461
|
+
"""
|
|
462
|
+
if not rule_ids and not group_ids:
|
|
463
|
+
raise ValueError("rule_ids and group_ids can not be empty at the same time")
|
|
464
|
+
path = b'/rule'
|
|
465
|
+
params = {
|
|
466
|
+
"delete": ""
|
|
467
|
+
}
|
|
468
|
+
body = {
|
|
469
|
+
"ruleIds": rule_ids,
|
|
470
|
+
"groupIds": group_ids
|
|
471
|
+
}
|
|
472
|
+
return self._send_request(http_methods.POST, path, params=params, body=json.dumps(body))
|
|
473
|
+
|
|
474
|
+
def get_records(self, group_id, page_no=1, page_size=1000, order=None, order_by="startTime",
|
|
475
|
+
start_time=None, end_time=None):
|
|
476
|
+
"""
|
|
477
|
+
Get details of a specific group
|
|
478
|
+
:param group_id:
|
|
479
|
+
Group identifier
|
|
480
|
+
:type group_id: str
|
|
481
|
+
|
|
482
|
+
:param page_no:
|
|
483
|
+
Page number
|
|
484
|
+
:type page_no: int
|
|
485
|
+
|
|
486
|
+
:param page_size:
|
|
487
|
+
Page size
|
|
488
|
+
:type page_size: int
|
|
489
|
+
|
|
490
|
+
:param order:
|
|
491
|
+
Order-ascending order or descending order
|
|
492
|
+
:type order: string
|
|
493
|
+
|
|
494
|
+
:param order_by:
|
|
495
|
+
Order by parameter
|
|
496
|
+
:type order_by: string
|
|
497
|
+
|
|
498
|
+
:param start_time:
|
|
499
|
+
Start time for filtering the results
|
|
500
|
+
:type start_time: string
|
|
501
|
+
|
|
502
|
+
:param end_time:
|
|
503
|
+
End time for filtering the results
|
|
504
|
+
:type end_time: string
|
|
505
|
+
|
|
506
|
+
:return:
|
|
507
|
+
rtype baidubce.bce_response.BceResponse
|
|
508
|
+
"""
|
|
509
|
+
params = {
|
|
510
|
+
b'groupid': group_id,
|
|
511
|
+
b'order': order,
|
|
512
|
+
b'orderBy': order_by,
|
|
513
|
+
b'pageNo': page_no,
|
|
514
|
+
b'pageSize': page_size,
|
|
515
|
+
b'startTime': start_time,
|
|
516
|
+
b'endTime': end_time,
|
|
517
|
+
}
|
|
518
|
+
path = b'/record'
|
|
519
|
+
return self._send_request(http_methods.GET, path, params=params)
|
|
520
|
+
|
|
521
|
+
def exec_rule(self, group_id, rule_id):
|
|
522
|
+
"""
|
|
523
|
+
Execute a specific rule within a group
|
|
524
|
+
:param group_id:
|
|
525
|
+
Group identifier
|
|
526
|
+
:type group_id: str
|
|
527
|
+
|
|
528
|
+
:param rule_id:
|
|
529
|
+
Rule identifier within the group
|
|
530
|
+
:type rule_id: str
|
|
531
|
+
|
|
532
|
+
:return:
|
|
533
|
+
rtype baidubce.bce_response.BceResponse
|
|
534
|
+
"""
|
|
535
|
+
|
|
536
|
+
group_id = compat.convert_to_bytes(group_id)
|
|
537
|
+
path = b'/group/%s' % group_id
|
|
538
|
+
params = {
|
|
539
|
+
b'execRule': '',
|
|
540
|
+
}
|
|
541
|
+
body = {
|
|
542
|
+
"ruleId": rule_id
|
|
543
|
+
}
|
|
544
|
+
return self._send_request(http_methods.POST, path, params=params, body=json.dumps(body))
|
|
545
|
+
|
|
546
|
+
def scaling_up(self, group_id, node_count, zone, expansion_strategy=None):
|
|
547
|
+
"""
|
|
548
|
+
Scale up a specific group
|
|
549
|
+
|
|
550
|
+
:param group_id:
|
|
551
|
+
Group identifier
|
|
552
|
+
:type group_id: str
|
|
553
|
+
|
|
554
|
+
:param node_count:
|
|
555
|
+
Number of nodes to be added
|
|
556
|
+
:type node_count: int
|
|
557
|
+
|
|
558
|
+
:param zone:
|
|
559
|
+
Zone where the nodes will be added
|
|
560
|
+
:type zone: str
|
|
561
|
+
|
|
562
|
+
:param expansion_strategy:
|
|
563
|
+
Strategy to be used for the expansion, optional
|
|
564
|
+
:type expansion_strategy: str, optional
|
|
565
|
+
|
|
566
|
+
:return:
|
|
567
|
+
rtype baidubce.bce_response.BceResponse
|
|
568
|
+
"""
|
|
569
|
+
group_id = compat.convert_to_bytes(group_id)
|
|
570
|
+
path = b'/group/%s' % group_id
|
|
571
|
+
params = {
|
|
572
|
+
b'scalingUp': '',
|
|
573
|
+
}
|
|
574
|
+
body = {
|
|
575
|
+
"nodeCount": node_count,
|
|
576
|
+
"zone": zone,
|
|
577
|
+
"expansionStrategy": expansion_strategy
|
|
578
|
+
}
|
|
579
|
+
return self._send_request(http_methods.POST, path, params=params, body=json.dumps(body))
|
|
580
|
+
|
|
581
|
+
def scaling_down(self, group_id, nodes):
|
|
582
|
+
"""
|
|
583
|
+
Scale down a specific group
|
|
584
|
+
|
|
585
|
+
:param group_id:
|
|
586
|
+
Group identifier
|
|
587
|
+
:type group_id: str
|
|
588
|
+
|
|
589
|
+
:param nodes:
|
|
590
|
+
Nodes to be removed
|
|
591
|
+
:type nodes: list or str
|
|
592
|
+
|
|
593
|
+
:return:
|
|
594
|
+
rtype baidubce.bce_response.BceResponse
|
|
595
|
+
"""
|
|
596
|
+
group_id = compat.convert_to_bytes(group_id)
|
|
597
|
+
path = b'/group/%s' % group_id
|
|
598
|
+
params = {
|
|
599
|
+
b'scalingDown': '',
|
|
600
|
+
}
|
|
601
|
+
body = {
|
|
602
|
+
"nodes": nodes,
|
|
603
|
+
}
|
|
604
|
+
return self._send_request(http_methods.POST, path, params=params, body=json.dumps(body))
|
|
605
|
+
|
|
606
|
+
def adjust_node(self, group_id, adjust_num):
|
|
607
|
+
"""
|
|
608
|
+
Adjust the number of nodes in a specific group
|
|
609
|
+
|
|
610
|
+
:param group_id:
|
|
611
|
+
Group identifier
|
|
612
|
+
:type group_id: str
|
|
613
|
+
|
|
614
|
+
:param adjust_num:
|
|
615
|
+
Number to adjust the nodes by. This could be positive (for adding nodes) or
|
|
616
|
+
negative (for removing nodes).
|
|
617
|
+
:type adjust_num: int
|
|
618
|
+
|
|
619
|
+
:return:
|
|
620
|
+
rtype baidubce.bce_response.BceResponse
|
|
621
|
+
"""
|
|
622
|
+
group_id = compat.convert_to_bytes(group_id)
|
|
623
|
+
path = b'/group/%s' % group_id
|
|
624
|
+
params = {
|
|
625
|
+
b'adjustNode': '',
|
|
626
|
+
}
|
|
627
|
+
body = {
|
|
628
|
+
"adjustNum": adjust_num,
|
|
629
|
+
}
|
|
630
|
+
return self._send_request(http_methods.POST, path, params=params, body=json.dumps(body))
|
|
631
|
+
|
|
632
|
+
def attach_node(self, group_id, nodes):
|
|
633
|
+
"""
|
|
634
|
+
Attach nodes to a specific group.
|
|
635
|
+
|
|
636
|
+
:param group_id: str
|
|
637
|
+
The unique identifier of the group to which the nodes will be attached.
|
|
638
|
+
:param nodes: list or str
|
|
639
|
+
The nodes that will be attached to the group.
|
|
640
|
+
This can be a list of node identifiers or a single node identifier.
|
|
641
|
+
|
|
642
|
+
:return: baidubce.bce_response.BceResponse
|
|
643
|
+
rtype baidubce.bce_response.BceResponse
|
|
644
|
+
"""
|
|
645
|
+
group_id = compat.convert_to_bytes(group_id)
|
|
646
|
+
path = b'/group/%s' % group_id
|
|
647
|
+
params = {
|
|
648
|
+
b'attachNode': '',
|
|
649
|
+
}
|
|
650
|
+
body = {
|
|
651
|
+
"nodes": nodes,
|
|
652
|
+
}
|
|
653
|
+
return self._send_request(http_methods.POST, path, params=params, body=json.dumps(body))
|