bce-python-sdk 0.9.10__py3-none-any.whl → 0.9.11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
baidubce/__init__.py CHANGED
@@ -18,7 +18,7 @@ from builtins import bytes
18
18
  from . import protocol
19
19
 
20
20
 
21
- SDK_VERSION = b'0.9.10'
21
+ SDK_VERSION = b'0.9.11'
22
22
  DEFAULT_SERVICE_DOMAIN = b'bcebos.com'
23
23
  URL_PREFIX = b'/v1'
24
24
  DEFAULT_ENCODING = 'UTF-8'
@@ -694,7 +694,7 @@ class BccClient(bce_base_client.BceBaseClient):
694
694
  spec_id=None, relation_tag=False, is_open_ipv6=False, deletion_protection=None,
695
695
  enterprise_security_group_id=None, security_group_ids=None, res_group_id=None,
696
696
  enterprise_security_group_ids=None, isomerismCard=None, file_systems=None,
697
- card_count=1, isomerism_card=None):
697
+ card_count=1, isomerism_card=None, is_eip_auto_related_delete=False):
698
698
  """
699
699
  Create a bcc Instance with the specified options.
700
700
  You must fill the field of clientToken,which is especially for keeping idempotent.
@@ -945,6 +945,10 @@ class BccClient(bce_base_client.BceBaseClient):
945
945
  This parameter is obsolete.
946
946
  :type file_systems: list<bcc_model.FileSystemModel>
947
947
 
948
+ :param is_eip_auto_related_delete:
949
+ The parameter to specify whether to delete the relevant EIP after the bidding instance is automatically deleted.
950
+ :type is_eip_auto_related_delete: boolean
951
+
948
952
  :return:
949
953
  :rtype baidubce.bce_response.BceResponse
950
954
  """
@@ -1059,6 +1063,7 @@ class BccClient(bce_base_client.BceBaseClient):
1059
1063
  body['userData'] = user_data
1060
1064
  if res_group_id is not None:
1061
1065
  body['resGroupId'] = res_group_id
1066
+ body['isEipAutoRelatedDelete'] = is_eip_auto_related_delete
1062
1067
 
1063
1068
  return self._send_request(http_methods.POST, path, json.dumps(body),
1064
1069
  params=params, config=config)
@@ -4661,6 +4666,34 @@ class BccClient(bce_base_client.BceBaseClient):
4661
4666
  }
4662
4667
  return self._send_request(http_methods.PUT, path, json.dumps(body), params=params, config=config)
4663
4668
 
4669
+ @required(instance_id=(bytes, str), is_eip_auto_related_delete=bool)
4670
+ def modify_related_delete_policy(self, instance_id, is_eip_auto_related_delete, client_token=None, config=None):
4671
+ """
4672
+ Set bid instance eip_auto_related_delete.
4673
+
4674
+ :param instance_id
4675
+ The id of instance.
4676
+ :type instance_id: string
4677
+
4678
+ :param is_eip_auto_related_delete
4679
+ Enables the deletion of the related EIP of bid instance when the instance is being deleted.
4680
+ :type is_eip_auto_related_delete: bool
4681
+
4682
+ :return:
4683
+ :rtype baidubce.bce_response.BceResponse
4684
+ """
4685
+ params = {}
4686
+ if client_token is None:
4687
+ params['clientToken'] = generate_client_token()
4688
+ else:
4689
+ params['clientToken'] = client_token
4690
+ instance_id = instance_id.encode(encoding='utf-8')
4691
+ path = b'/instance/%s/modifyRelatedDeletePolicy' % instance_id
4692
+ body = {
4693
+ "isEipAutoRelatedDelete": is_eip_auto_related_delete
4694
+ }
4695
+ return self._send_request(http_methods.PUT, path, json.dumps(body), params=params, config=config)
4696
+
4664
4697
  @required(volume_id=(bytes, str)) # ***Unicode***
4665
4698
  def release_volume_new(self, volume_id, auto_snapshot=None, manual_snapshot=None,
4666
4699
  recycle=None, client_token=None, config=None):
@@ -2632,6 +2632,7 @@ class BosClient(BceBaseClient):
2632
2632
  utils.parse_host_port(config.endpoint, config.protocol)
2633
2633
  if config.cname_enabled or utils.is_cname_like_host(host_name) or utils.is_custom_host(host_name, bucket_name):
2634
2634
  return utils.append_uri(bos.URL_PREFIX, key)
2635
+
2635
2636
  return utils.append_uri(bos.URL_PREFIX, bucket_name, key)
2636
2637
 
2637
2638
 
@@ -2656,12 +2657,7 @@ class BosClient(BceBaseClient):
2656
2657
  return config.endpoint
2657
2658
 
2658
2659
  if config.path_style_enable:
2659
- # check path style
2660
- if is_bos_path_style_host:
2661
- return config.endpoint
2662
- else:
2663
- raise ValueError(
2664
- 'endpoint is not path style, please set path_style_enable=False')
2660
+ return config.endpoint
2665
2661
 
2666
2662
  # 2. check cname domain
2667
2663
  if config.cname_enabled or utils.is_cname_like_host(user_host_name):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bce-python-sdk
3
- Version: 0.9.10
3
+ Version: 0.9.11
4
4
  Summary: BCE SDK for python
5
5
  Home-page: http://bce.baidu.com
6
6
  Author:
@@ -1,4 +1,4 @@
1
- baidubce/__init__.py,sha256=F301RgfHOuB0pEPcVqWq-DECRMcwcx3sHRoLHKJlHT4,813
1
+ baidubce/__init__.py,sha256=NKHP7fdhY2wmMYGIgd3bqTUCsyTSr-QtSNUf5gewPac,813
2
2
  baidubce/bce_base_client.py,sha256=7gjkRy_YlTTb6TXHYHyZRYMjdVO7FTtHMdwXx8bPgsE,3428
3
3
  baidubce/bce_client_configuration.py,sha256=Wzuu9JR11hcHxgcKQIP63qIChEzVrT9ZA_fyqIfqqP4,3055
4
4
  baidubce/bce_response.py,sha256=V5a3bgRj04cM3Ml3s1OByLyZZSGDUy9PL52JSugmCgM,1655
@@ -27,7 +27,7 @@ baidubce/services/bbc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
27
27
  baidubce/services/bbc/bbc_client.py,sha256=ewS7ju_qF3v4WBfqWhr1H4XX5QldItnarD3ZPrt0SQ0,37306
28
28
  baidubce/services/bbc/bbc_model.py,sha256=Dy80LZ4ro_iS3UejJ_CL9kI7OyMSBoDitTE4J1XAC_g,1790
29
29
  baidubce/services/bcc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- baidubce/services/bcc/bcc_client.py,sha256=D_lCApGNMhT0SE5D-UgJjFdSgtfpsjD2RP-cgkgLg9o,239053
30
+ baidubce/services/bcc/bcc_client.py,sha256=4sPnQl_yWRjMcmrUp4NxmhT7x1o7qMTg0ey876AYUJc,240500
31
31
  baidubce/services/bcc/bcc_model.py,sha256=7v5WzqDDhl7MmI3vDdOuyM5S9isxkKoaIv5RAqzzTRI,5919
32
32
  baidubce/services/bcc/fpga_card_type.py,sha256=n6goqnapIgAC9_sciA_2he5HFqPRbRv109qitO7qpd8,948
33
33
  baidubce/services/bcc/gpu_card_type.py,sha256=HEfMzne-UC5F295JPrPUu7V9F5g-hbXF2TNBontEFes,1054
@@ -45,7 +45,7 @@ baidubce/services/blb/user_service_client.py,sha256=bS8SKQKslvoSefVVl76A6cgvqyZn
45
45
  baidubce/services/bmr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
46
  baidubce/services/bmr/bmr_client.py,sha256=ntJie-R6qFxdd6znpfCj25RSoJ6gOV0o2Tn9asJThQg,20565
47
47
  baidubce/services/bos/__init__.py,sha256=bRvJAiFjUIBF64HeoZ7bkTjGfqkKJAvxYWBSEvbUOIc,813
48
- baidubce/services/bos/bos_client.py,sha256=WLy7vQcdKIVUSl3OnI68PeQ-NYdQuSUWocOZ0hjojzY,100072
48
+ baidubce/services/bos/bos_client.py,sha256=dw3lsg2gVVnl1xsuPY78I5e8Faf9fAOZQOS78FEqeJQ,99861
49
49
  baidubce/services/bos/bos_handler.py,sha256=ZWVjezraJsdNy0tsX8fZkWPmSBYLSlGolKqZ1CcWE7A,1832
50
50
  baidubce/services/bos/canned_acl.py,sha256=Y2qvU81OI_nT0uu96MyTemXyR2EnNVVYrJxfPS1rhBA,723
51
51
  baidubce/services/bos/storage_class.py,sha256=RiwV9b6N6dHFzNG6k4LUhjLngqfC837FWUvP-mr5BZ8,729
@@ -173,7 +173,7 @@ baidubce/services/vpc/vpc_client.py,sha256=6HD-TIxmNPujzIVc37Z9OOp_JUOoITUPzTwjm
173
173
  baidubce/services/vpn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
174
174
  baidubce/services/vpn/vpn_client.py,sha256=VGmPmnl7Il_NcbGMAgASmVK_1IF9HQ8PJ-WLij-7Axc,28554
175
175
  baidubce/services/vpn/vpn_model.py,sha256=r9V2At9ll9cZTOryGflS9tH9DlHdeelKYuGXvTNyTgg,3364
176
- bce_python_sdk-0.9.10.dist-info/METADATA,sha256=xAmVv_XWa7wwA8w4HDzu9fOJYJ81-TO-eFbvJLuPeVo,319
177
- bce_python_sdk-0.9.10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
178
- bce_python_sdk-0.9.10.dist-info/top_level.txt,sha256=Oh6eo_-T_AuEDpIaR54biUUPThxsoQiYMVHLBTaweQs,9
179
- bce_python_sdk-0.9.10.dist-info/RECORD,,
176
+ bce_python_sdk-0.9.11.dist-info/METADATA,sha256=_vUvdPsuJGEos3NshGbC2U95k7j65cm14zEBi2rh8Lw,319
177
+ bce_python_sdk-0.9.11.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
178
+ bce_python_sdk-0.9.11.dist-info/top_level.txt,sha256=Oh6eo_-T_AuEDpIaR54biUUPThxsoQiYMVHLBTaweQs,9
179
+ bce_python_sdk-0.9.11.dist-info/RECORD,,