bce-python-sdk 0.9.49__py3-none-any.whl → 0.9.50__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.49'
21
+ SDK_VERSION = b'0.9.50'
22
22
  DEFAULT_SERVICE_DOMAIN = b'bcebos.com'
23
23
  URL_PREFIX = b'/v1'
24
24
  DEFAULT_ENCODING = 'UTF-8'
@@ -49,7 +49,7 @@ class EipClient(BceBaseClient):
49
49
  BceBaseClient.__init__(self, config)
50
50
 
51
51
  def create_eip(self, bandwidth_in_mbps, name=None, billing=None,
52
- client_token=None, config=None):
52
+ route_type=None, client_token=None, config=None):
53
53
  """
54
54
  Create an eip with the specified options.
55
55
 
@@ -76,6 +76,8 @@ class EipClient(BceBaseClient):
76
76
  'name': name,
77
77
  'bandwidthInMbps': bandwidth_in_mbps
78
78
  }
79
+ if route_type is not None:
80
+ body['routeType'] = route_type
79
81
  if billing is None:
80
82
  body['billing'] = {
81
83
  'paymentTiming': 'Postpaid',
@@ -255,7 +257,7 @@ class EipClient(BceBaseClient):
255
257
  return self._send_request(http_methods.PUT, path, params=params, config=config)
256
258
 
257
259
 
258
- def bind_eip(self, eip, instance_type, instance_id, client_token=None,
260
+ def bind_eip(self, eip, instance_type, instance_id, instance_ip, client_token=None,
259
261
  config=None):
260
262
  """
261
263
  bind the eip to a specified instanceId and instanceType
@@ -282,6 +284,8 @@ class EipClient(BceBaseClient):
282
284
  'instanceType': instance_type,
283
285
  'instanceId': instance_id
284
286
  }
287
+ if instance_ip is not None:
288
+ body['instanceIp'] = instance_ip
285
289
  path = utils.append_uri(self._get_path(), eip)
286
290
  if client_token is None:
287
291
  client_token = self._generate_default_client_token()
@@ -396,8 +400,8 @@ class EipClient(BceBaseClient):
396
400
  return self._send_request(http_methods.PUT, path, params=params, config=config)
397
401
 
398
402
 
399
- def list_eips(self, eip=None, instance_type=None, instance_id=None, status=None, marker=None, max_keys=1000,
400
- config=None):
403
+ def list_eips(self, eip=None, instance_type=None, ip_version=None, instance_id=None,
404
+ status=None, marker=None, max_keys=1000, config=None):
401
405
  """
402
406
  get a list of eip owned by the authenticated user and specified
403
407
  conditions. we can Also get a single eip function through this
@@ -477,6 +481,8 @@ class EipClient(BceBaseClient):
477
481
  params[b'marker'] = marker
478
482
  if max_keys is not None:
479
483
  params[b'maxKeys'] = max_keys
484
+ if ip_version is not None:
485
+ params[b'ipVersion'] = ip_version
480
486
  return self._send_request(http_methods.GET, path, params=params,
481
487
  config=config)
482
488
 
@@ -80,7 +80,8 @@ class EipGroupClient(bce_base_client.BceBaseClient):
80
80
  bandwidth_in_mbps=int)
81
81
  def create_eip_group(self, eip_count, bandwidth_in_mbps,
82
82
  name=None, client_token=None,
83
- billing=None, config=None):
83
+ billing=None, route_type=None,
84
+ config=None):
84
85
  """
85
86
  Create a shared bandwidth EIP group with specified options.
86
87
  Real-name authentication is required before creating EIP groups.
@@ -131,6 +132,8 @@ class EipGroupClient(bce_base_client.BceBaseClient):
131
132
  'bandwidthInMbps': bandwidth_in_mbps,
132
133
  'billing': billing.__dict__
133
134
  }
135
+ if route_type is not None:
136
+ body['routeType'] = route_type
134
137
  if name is not None:
135
138
  body['name'] = name
136
139
  return self._send_request(http_methods.POST,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bce-python-sdk
3
- Version: 0.9.49
3
+ Version: 0.9.50
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=_n5KYSmdQGgAI1z8Mf_HMg7EupYhpugmJe5zZfK50Dc,813
1
+ baidubce/__init__.py,sha256=oRDX6H-IwiSqcUwytiv4OdUs6Icl0T3OOx_QTN6e2Ik,813
2
2
  baidubce/bce_base_client.py,sha256=7gjkRy_YlTTb6TXHYHyZRYMjdVO7FTtHMdwXx8bPgsE,3428
3
3
  baidubce/bce_client_configuration.py,sha256=i9z5wVXaRSlJxE0LD1odexza35KQyFy7m1Az5XclD_I,3252
4
4
  baidubce/bce_response.py,sha256=gOj48U6iurYJsChzFdrB7Rj3RpkU-fUdhtftrIj9o8U,1985
@@ -86,8 +86,8 @@ baidubce/services/dumap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
86
86
  baidubce/services/dumap/dumap_client.py,sha256=1hofadH3WIMbAJZrIld_blz0enc5kSnVHFASnhLlp3s,3955
87
87
  baidubce/services/eip/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
88
  baidubce/services/eip/eip_bp_client.py,sha256=0saz0xt3itBzmW4e78gXH0jDIllEzEJXypDRqMXYjjk,13055
89
- baidubce/services/eip/eip_client.py,sha256=xAYg9laJ_hwOhUwKn-mPIPRNuBbWIGx22rvqWCsnJDY,23965
90
- baidubce/services/eip/eip_group_client.py,sha256=i9FVsjxBCxaFqjI8F_II9Kv8lyl0EF4L8_9uu7TJ4T4,18955
89
+ baidubce/services/eip/eip_client.py,sha256=ZBTkdk4A8HdCB3SEWn5xycIR9Yi177PG3l5jVRrwVrU,24252
90
+ baidubce/services/eip/eip_group_client.py,sha256=Q-Acr8G7zyESeNKq2r-6ClbazyyP8WTR1SeBar7mAus,19075
91
91
  baidubce/services/eip/eip_group_model.py,sha256=9PX4E6I5n3qGDbukBAPi8AAlPZEiTVzUregSqYvzt9c,1914
92
92
  baidubce/services/eip/eip_tp_client.py,sha256=JtYHW8GrCH7Jxr7WK-ZdCPJsGBR5e-moBVo0k8EMtls,8798
93
93
  baidubce/services/eip/model.py,sha256=tIG5lOJ_LsJqZwyk8L42wNdW0m5h3SHMgauk4cb1Lh8,1769
@@ -174,7 +174,7 @@ baidubce/services/vpc/vpc_client.py,sha256=q3fxQHLtKx6XQI68-YTkuCTeVkfxQgjbd1WFZ
174
174
  baidubce/services/vpn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
175
175
  baidubce/services/vpn/vpn_client.py,sha256=rrnQElD-LTttsqMbbIHoHK0Jdc7FrVVTZIdu-0Zthr8,31352
176
176
  baidubce/services/vpn/vpn_model.py,sha256=C9rEBYyFIDjrqvqJG4WEin6qVzEIvbhPvT5KwDYm1qA,3365
177
- bce_python_sdk-0.9.49.dist-info/METADATA,sha256=m_Cr034N1s8aSk4acAXDVLXYmilTDziCHPOguQc3Qc4,416
178
- bce_python_sdk-0.9.49.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
179
- bce_python_sdk-0.9.49.dist-info/top_level.txt,sha256=Oh6eo_-T_AuEDpIaR54biUUPThxsoQiYMVHLBTaweQs,9
180
- bce_python_sdk-0.9.49.dist-info/RECORD,,
177
+ bce_python_sdk-0.9.50.dist-info/METADATA,sha256=IY0CDJ6LKrCe1Q6jWkxkFAWL3CUCtNpuJIRpAxgFuXE,416
178
+ bce_python_sdk-0.9.50.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
179
+ bce_python_sdk-0.9.50.dist-info/top_level.txt,sha256=Oh6eo_-T_AuEDpIaR54biUUPThxsoQiYMVHLBTaweQs,9
180
+ bce_python_sdk-0.9.50.dist-info/RECORD,,