Skip to content

Commit e0740a4

Browse files
authored
Release/0.6.2 (#13)
ENHANCEMENTS: - Update fields of `UHost` api - Add `DescribeIsolationGroup ` of `UHost` - Add `DescribeUHostInstanceSnapshot` of `UHost` BUG FIXES: - Fix fields of `BatchDescribeNewUcdnDomain`
1 parent 03295be commit e0740a4

File tree

10 files changed

+282
-70
lines changed

10 files changed

+282
-70
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,5 @@ migrate:
8585
PYTHONPATH=. python scripts/migrate --source .migrate/docs --output docs
8686
PYTHONPATH=. python scripts/migrate --source .migrate/examples --output examples
8787
PYTHONPATH=. python scripts/migrate --source .migrate/README.md --output README.md
88+
sed -i 's/unicode/unicode # noqa: F821/g' ucloud/core/utils/compat.py
8889
rm -rf .migrate

docs/services.rst

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
UCloud SDK Services
22
===================
33

4+
PathX
5+
-----
6+
7+
.. autoclass:: ucloud.services.pathx.client.PathXClient
8+
:members:
9+
410
StepFlow
511
--------
612

ucloud/client.py

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ def __init__(self, config, transport=None, middleware=None):
99
self._config = config
1010
super(Client, self).__init__(config, transport, middleware)
1111

12+
def pathx(self):
13+
from ucloud.services.pathx.client import PathXClient
14+
15+
return PathXClient(
16+
self._config, self.transport, self.middleware, self.logger
17+
)
18+
1219
def stepflow(self):
1320
from ucloud.services.stepflow.client import StepFlowClient
1421

ucloud/services/ucdn/client.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,29 @@ def batch_describe_new_ucdn_domain(self, req=None, **kwargs):
2424
2525
- **Arrearage** (list) - 标识欠费的数组,数组含有下列元素值, 1=国内流量有欠费 2=国外流量有欠费 3=国内带宽有欠费 4=国外带宽有欠费
2626
- **ChargeType** (int) - 当前计费方式,10=流量付费 20=带宽日峰值 30=按月后付费
27-
- **DomainList** (list) - 见 **DomainInfo** 模型定义
27+
- **DomainSet** (list) - 见 **DomainInfo** 模型定义
2828
- **LastChargeType** (int) - 表示最后一次切换的计费方式,10=流量付费 20=带宽日峰值 30=按月后付费 40=未选择计费方式
2929
- **MaxDomainNum** (int) - 最大域名数量,默认20
3030
- **TotalCount** (int) - 满足条件的域名个数
3131
- **Vip** (str) - vip标示,yes-是 no-否
3232
3333
**Response Model**
3434
35-
**AccessConf**
36-
37-
- **IpBlacklist** (str) - 多个ip用逗号隔开
38-
3935
**CacheConf**
4036
41-
- **CacheBehavior** (bool) - 是否缓存,true为缓存,false为不缓存。为false的情况下,CacheTTL和CacheUnit强制不生效
37+
- **CacheBehavior** (int) - 是否缓存,1为缓存,0为不缓存。为0的情况下,CacheTTL和CacheUnit强制不生效
4238
- **CacheTTL** (int) - 缓存时间
4339
- **CacheUnit** (str) - 缓存时间的单位。sec(秒),min(分钟),hour(小时),day(天)
4440
- **Description** (str) - 缓存规则描述
45-
- **FollowOriginRule** (bool) - 是否优先遵循源站头部缓存策略,false为不优先遵循源站,true为优先遵循源站缓存头部。默认为false
41+
- **FollowOriginRule** (int) - 是否优先遵循源站头部缓存策略,0为不优先遵循源站,1为优先遵循源站缓存头部。默认为0
4642
- **HttpCodePattern** (str) - 状态码默认情况只缓存200类状态码,支持正则
47-
- **IgnoreQueryString** (bool) - 是否忽略参数缓存(false为不忽略,true为忽略,默认为false
43+
- **IgnoreQueryString** (int) - 是否忽略参数缓存(0为不忽略,1为忽略,默认为0
4844
- **PathPattern** (str) - 路径模式,支持正则
4945
46+
**AccessConf**
47+
48+
- **IpBlacklist** (str) - 多个ip用逗号隔开
49+
5050
**DomainInfo**
5151
5252
- **AccessConf** (dict) - 见 **AccessConf** 模型定义

ucloud/services/ucdn/schemas/apis.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class BatchDescribeNewUcdnDomainResponseSchema(schema.ResponseSchema):
3535
fields.Str(), required=False, load_from="Arrearage"
3636
),
3737
"ChargeType": fields.Int(required=False, load_from="ChargeType"),
38-
"DomainList": fields.List(
39-
models.DomainInfoSchema(), required=False, load_from="DomainList"
38+
"DomainSet": fields.List(
39+
models.DomainInfoSchema(), required=False, load_from="DomainSet"
4040
),
4141
"LastChargeType": fields.Int(
4242
required=False, load_from="LastChargeType"

ucloud/services/ucdn/schemas/models.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,37 @@
44
from ucloud.core.typesystem import schema, fields
55

66

7-
class AccessConfSchema(schema.ResponseSchema):
8-
""" AccessConf - 访问控制
9-
"""
10-
11-
fields = {
12-
"IpBlacklist": fields.Str(required=False, load_from="IpBlacklist")
13-
}
14-
15-
167
class CacheConfSchema(schema.ResponseSchema):
178
""" CacheConf - 缓存配置
189
"""
1910

2011
fields = {
21-
"CacheBehavior": fields.Bool(required=False, load_from="CacheBehavior"),
12+
"CacheBehavior": fields.Int(required=False, load_from="CacheBehavior"),
2213
"CacheTTL": fields.Int(required=False, load_from="CacheTTL"),
2314
"CacheUnit": fields.Str(required=False, load_from="CacheUnit"),
2415
"Description": fields.Str(required=False, load_from="Description"),
25-
"FollowOriginRule": fields.Bool(
16+
"FollowOriginRule": fields.Int(
2617
required=False, load_from="FollowOriginRule"
2718
),
2819
"HttpCodePattern": fields.Str(
2920
required=False, load_from="HttpCodePattern"
3021
),
31-
"IgnoreQueryString": fields.Bool(
22+
"IgnoreQueryString": fields.Int(
3223
required=False, load_from="IgnoreQueryString"
3324
),
3425
"PathPattern": fields.Str(required=False, load_from="PathPattern"),
3526
}
3627

3728

29+
class AccessConfSchema(schema.ResponseSchema):
30+
""" AccessConf - 访问控制
31+
"""
32+
33+
fields = {
34+
"IpBlacklist": fields.Str(required=False, load_from="IpBlacklist")
35+
}
36+
37+
3838
class DomainInfoSchema(schema.ResponseSchema):
3939
""" DomainInfo - 域名配置
4040
"""

0 commit comments

Comments
 (0)