Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,5 @@ migrate:
PYTHONPATH=. python scripts/migrate --source .migrate/docs --output docs
PYTHONPATH=. python scripts/migrate --source .migrate/examples --output examples
PYTHONPATH=. python scripts/migrate --source .migrate/README.md --output README.md
sed -i 's/unicode/unicode # noqa: F821/g' ucloud/core/utils/compat.py
rm -rf .migrate
6 changes: 6 additions & 0 deletions docs/services.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
UCloud SDK Services
===================

PathX
-----

.. autoclass:: ucloud.services.pathx.client.PathXClient
:members:

StepFlow
--------

Expand Down
7 changes: 7 additions & 0 deletions ucloud/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ def __init__(self, config, transport=None, middleware=None):
self._config = config
super(Client, self).__init__(config, transport, middleware)

def pathx(self):
from ucloud.services.pathx.client import PathXClient

return PathXClient(
self._config, self.transport, self.middleware, self.logger
)

def stepflow(self):
from ucloud.services.stepflow.client import StepFlowClient

Expand Down
16 changes: 8 additions & 8 deletions ucloud/services/ucdn/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@ def batch_describe_new_ucdn_domain(self, req=None, **kwargs):

- **Arrearage** (list) - 标识欠费的数组,数组含有下列元素值, 1=国内流量有欠费 2=国外流量有欠费 3=国内带宽有欠费 4=国外带宽有欠费
- **ChargeType** (int) - 当前计费方式,10=流量付费 20=带宽日峰值 30=按月后付费
- **DomainList** (list) - 见 **DomainInfo** 模型定义
- **DomainSet** (list) - 见 **DomainInfo** 模型定义
- **LastChargeType** (int) - 表示最后一次切换的计费方式,10=流量付费 20=带宽日峰值 30=按月后付费 40=未选择计费方式
- **MaxDomainNum** (int) - 最大域名数量,默认20
- **TotalCount** (int) - 满足条件的域名个数
- **Vip** (str) - vip标示,yes-是 no-否

**Response Model**

**AccessConf**

- **IpBlacklist** (str) - 多个ip用逗号隔开

**CacheConf**

- **CacheBehavior** (bool) - 是否缓存,true为缓存,false为不缓存。为false的情况下,CacheTTL和CacheUnit强制不生效
- **CacheBehavior** (int) - 是否缓存,1为缓存,0为不缓存。为0的情况下,CacheTTL和CacheUnit强制不生效
- **CacheTTL** (int) - 缓存时间
- **CacheUnit** (str) - 缓存时间的单位。sec(秒),min(分钟),hour(小时),day(天)
- **Description** (str) - 缓存规则描述
- **FollowOriginRule** (bool) - 是否优先遵循源站头部缓存策略,false为不优先遵循源站,true为优先遵循源站缓存头部。默认为false
- **FollowOriginRule** (int) - 是否优先遵循源站头部缓存策略,0为不优先遵循源站,1为优先遵循源站缓存头部。默认为0
- **HttpCodePattern** (str) - 状态码默认情况只缓存200类状态码,支持正则
- **IgnoreQueryString** (bool) - 是否忽略参数缓存(false为不忽略,true为忽略,默认为false
- **IgnoreQueryString** (int) - 是否忽略参数缓存(0为不忽略,1为忽略,默认为0
- **PathPattern** (str) - 路径模式,支持正则

**AccessConf**

- **IpBlacklist** (str) - 多个ip用逗号隔开

**DomainInfo**

- **AccessConf** (dict) - 见 **AccessConf** 模型定义
Expand Down
4 changes: 2 additions & 2 deletions ucloud/services/ucdn/schemas/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class BatchDescribeNewUcdnDomainResponseSchema(schema.ResponseSchema):
fields.Str(), required=False, load_from="Arrearage"
),
"ChargeType": fields.Int(required=False, load_from="ChargeType"),
"DomainList": fields.List(
models.DomainInfoSchema(), required=False, load_from="DomainList"
"DomainSet": fields.List(
models.DomainInfoSchema(), required=False, load_from="DomainSet"
),
"LastChargeType": fields.Int(
required=False, load_from="LastChargeType"
Expand Down
24 changes: 12 additions & 12 deletions ucloud/services/ucdn/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@
from ucloud.core.typesystem import schema, fields


class AccessConfSchema(schema.ResponseSchema):
""" AccessConf - 访问控制
"""

fields = {
"IpBlacklist": fields.Str(required=False, load_from="IpBlacklist")
}


class CacheConfSchema(schema.ResponseSchema):
""" CacheConf - 缓存配置
"""

fields = {
"CacheBehavior": fields.Bool(required=False, load_from="CacheBehavior"),
"CacheBehavior": fields.Int(required=False, load_from="CacheBehavior"),
"CacheTTL": fields.Int(required=False, load_from="CacheTTL"),
"CacheUnit": fields.Str(required=False, load_from="CacheUnit"),
"Description": fields.Str(required=False, load_from="Description"),
"FollowOriginRule": fields.Bool(
"FollowOriginRule": fields.Int(
required=False, load_from="FollowOriginRule"
),
"HttpCodePattern": fields.Str(
required=False, load_from="HttpCodePattern"
),
"IgnoreQueryString": fields.Bool(
"IgnoreQueryString": fields.Int(
required=False, load_from="IgnoreQueryString"
),
"PathPattern": fields.Str(required=False, load_from="PathPattern"),
}


class AccessConfSchema(schema.ResponseSchema):
""" AccessConf - 访问控制
"""

fields = {
"IpBlacklist": fields.Str(required=False, load_from="IpBlacklist")
}


class DomainInfoSchema(schema.ResponseSchema):
""" DomainInfo - 域名配置
"""
Expand Down
Loading