Skip to content

sdk: rolling update for 0.11.47 #251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2023
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
48 changes: 24 additions & 24 deletions ucloud/services/ipsecvpn/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,6 @@ class VPNGatewayDataSetSchema(schema.ResponseSchema):
}


class IKEDataSchema(schema.ResponseSchema):
"""IKEData - IKE信息"""

fields = {
"IKEAuthenticationAlgorithm": fields.Str(
required=False, load_from="IKEAuthenticationAlgorithm"
),
"IKEDhGroup": fields.Str(required=False, load_from="IKEDhGroup"),
"IKEEncryptionAlgorithm": fields.Str(
required=False, load_from="IKEEncryptionAlgorithm"
),
"IKEExchangeMode": fields.Str(
required=False, load_from="IKEExchangeMode"
),
"IKELocalId": fields.Str(required=False, load_from="IKELocalId"),
"IKEPreSharedKey": fields.Str(
required=False, load_from="IKEPreSharedKey"
),
"IKERemoteId": fields.Str(required=False, load_from="IKERemoteId"),
"IKESALifetime": fields.Str(required=False, load_from="IKESALifetime"),
"IKEVersion": fields.Str(required=False, load_from="IKEVersion"),
}


class IPSecDataSchema(schema.ResponseSchema):
"""IPSecData - IPSec参数"""

Expand All @@ -98,6 +74,30 @@ class IPSecDataSchema(schema.ResponseSchema):
}


class IKEDataSchema(schema.ResponseSchema):
"""IKEData - IKE信息"""

fields = {
"IKEAuthenticationAlgorithm": fields.Str(
required=False, load_from="IKEAuthenticationAlgorithm"
),
"IKEDhGroup": fields.Str(required=False, load_from="IKEDhGroup"),
"IKEEncryptionAlgorithm": fields.Str(
required=False, load_from="IKEEncryptionAlgorithm"
),
"IKEExchangeMode": fields.Str(
required=False, load_from="IKEExchangeMode"
),
"IKELocalId": fields.Str(required=False, load_from="IKELocalId"),
"IKEPreSharedKey": fields.Str(
required=False, load_from="IKEPreSharedKey"
),
"IKERemoteId": fields.Str(required=False, load_from="IKERemoteId"),
"IKESALifetime": fields.Str(required=False, load_from="IKESALifetime"),
"IKEVersion": fields.Str(required=False, load_from="IKEVersion"),
}


class VPNTunnelDataSetSchema(schema.ResponseSchema):
"""VPNTunnelDataSet - DescribeVPNTunnel信息"""

Expand Down
38 changes: 19 additions & 19 deletions ucloud/services/pathx/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,6 @@ class SrcAreaInfoSchema(schema.ResponseSchema):
}


class OutPublicIpInfoSchema(schema.ResponseSchema):
"""OutPublicIpInfo - 线路回源IP信息"""

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


class AccelerationAreaInfosSchema(schema.ResponseSchema):
"""AccelerationAreaInfos -"""

Expand All @@ -165,6 +156,15 @@ class ForwardTaskSchema(schema.ResponseSchema):
}


class OutPublicIpInfoSchema(schema.ResponseSchema):
"""OutPublicIpInfo - 线路回源IP信息"""

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


class ForwardInfoSchema(schema.ResponseSchema):
"""ForwardInfo -"""

Expand Down Expand Up @@ -240,16 +240,6 @@ class UGAATaskSchema(schema.ResponseSchema):
}


class UGAL4ForwarderSchema(schema.ResponseSchema):
"""UGAL4Forwarder - UGA实例 4层转发器信息"""

fields = {
"Port": fields.Int(required=True, load_from="Port"),
"Protocol": fields.Str(required=True, load_from="Protocol"),
"RSPort": fields.Int(required=True, load_from="RSPort"),
}


class UPathSetSchema(schema.ResponseSchema):
"""UPathSet - uga关联的upath信息"""

Expand Down Expand Up @@ -277,6 +267,16 @@ class UGAL7ForwarderSchema(schema.ResponseSchema):
}


class UGAL4ForwarderSchema(schema.ResponseSchema):
"""UGAL4Forwarder - UGA实例 4层转发器信息"""

fields = {
"Port": fields.Int(required=True, load_from="Port"),
"Protocol": fields.Str(required=True, load_from="Protocol"),
"RSPort": fields.Int(required=True, load_from="RSPort"),
}


class UGAAInfoSchema(schema.ResponseSchema):
"""UGAAInfo - 全球加速实例信息"""

Expand Down
16 changes: 8 additions & 8 deletions ucloud/services/ucdn/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
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 - 缓存配置"""

Expand All @@ -21,14 +29,6 @@ class CacheConfSchema(schema.ResponseSchema):
}


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

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


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

Expand Down
22 changes: 11 additions & 11 deletions ucloud/services/udi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,12 @@ def describe_media_functions(

**Response Model**

**ParamCustom**
- **Max** (int) -
- **Min** (int) -
- **ParamName** (str) -
- **ParamType** (str) -
**Function**
- **DisplayName** (str) -
- **FunctionName** (str) -
- **InputType** (str) -
- **OutputType** (str) -
- **SupportParams** (list) - 见 **ParamOption** 模型定义


**ParamOption**
Expand All @@ -193,12 +194,11 @@ def describe_media_functions(
- **WhenValueCustom** (list) - 见 **ParamCustom** 模型定义


**Function**
- **DisplayName** (str) -
- **FunctionName** (str) -
- **InputType** (str) -
- **OutputType** (str) -
- **SupportParams** (list) - 见 **ParamOption** 模型定义
**ParamCustom**
- **Max** (int) -
- **Min** (int) -
- **ParamName** (str) -
- **ParamType** (str) -


"""
Expand Down
22 changes: 11 additions & 11 deletions ucloud/services/uec/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ class IpListSchema(schema.ResponseSchema):
}


class StorVolumeInfoSchema(schema.ResponseSchema):
"""StorVolumeInfo - 容器组存储卷信息"""

fields = {
"DiskSize": fields.Int(required=False, load_from="DiskSize"),
"MountPoint": fields.Str(required=False, load_from="MountPoint"),
"Name": fields.Str(required=False, load_from="Name"),
"ResourceId": fields.Str(required=False, load_from="ResourceId"),
}


class DockerInfoSchema(schema.ResponseSchema):
"""DockerInfo - 容器信息"""

Expand Down Expand Up @@ -105,17 +116,6 @@ class ImageListSchema(schema.ResponseSchema):
}


class StorVolumeInfoSchema(schema.ResponseSchema):
"""StorVolumeInfo - 容器组存储卷信息"""

fields = {
"DiskSize": fields.Int(required=False, load_from="DiskSize"),
"MountPoint": fields.Str(required=False, load_from="MountPoint"),
"Name": fields.Str(required=False, load_from="Name"),
"ResourceId": fields.Str(required=False, load_from="ResourceId"),
}


class HolderListSchema(schema.ResponseSchema):
"""HolderList - 容器组信息"""

Expand Down
20 changes: 10 additions & 10 deletions ucloud/services/ufile/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,33 +65,33 @@ class LifeCycleItemSchema(schema.ResponseSchema):
}


class UFileDailyReportItemSchema(schema.ResponseSchema):
"""UFileDailyReportItem -"""
class UFileTotalReportItemSchema(schema.ResponseSchema):
"""UFileTotalReportItem - 总消费信息"""

fields = {
"AcRestore": fields.Float(required=False, load_from="AcRestore"),
"AcStorage": fields.Float(required=False, load_from="AcStorage"),
"ApiTimes": fields.Float(required=False, load_from="ApiTimes"),
"BusyFlow": fields.Float(required=False, load_from="BusyFlow"),
"CdnFlow": fields.Float(required=False, load_from="CdnFlow"),
"Date": fields.Int(required=False, load_from="Date"),
"Flow": fields.Float(required=False, load_from="Flow"),
"IaGetSize": fields.Float(required=False, load_from="IaGetSize"),
"IaStorage": fields.Float(required=False, load_from="IaStorage"),
"IdleFlow": fields.Float(required=False, load_from="IdleFlow"),
"Storage": fields.Float(required=False, load_from="Storage"),
}


class UFileTotalReportItemSchema(schema.ResponseSchema):
"""UFileTotalReportItem - 总消费信息"""
class UFileDailyReportItemSchema(schema.ResponseSchema):
"""UFileDailyReportItem -"""

fields = {
"AcRestore": fields.Float(required=False, load_from="AcRestore"),
"AcStorage": fields.Float(required=False, load_from="AcStorage"),
"ApiTimes": fields.Float(required=False, load_from="ApiTimes"),
"BusyFlow": fields.Float(required=False, load_from="BusyFlow"),
"CdnFlow": fields.Float(required=False, load_from="CdnFlow"),
"Date": fields.Int(required=False, load_from="Date"),
"Flow": fields.Float(required=False, load_from="Flow"),
"IaGetSize": fields.Float(required=False, load_from="IaGetSize"),
"IaStorage": fields.Float(required=False, load_from="IaStorage"),
"IdleFlow": fields.Float(required=False, load_from="IdleFlow"),
"Storage": fields.Float(required=False, load_from="Storage"),
}


Expand Down
36 changes: 36 additions & 0 deletions ucloud/services/uhost/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,42 @@ def get_uhost_instance_vnc_info(
resp = self.invoke("GetUHostInstanceVncInfo", d, **kwargs)
return apis.GetUHostInstanceVncInfoResponseSchema().loads(resp)

def get_uhost_renew_price(
self, req: typing.Optional[dict] = None, **kwargs
) -> dict:
"""GetUHostRenewPrice - 获取主机续费价格

**Request**

- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
- **ChargeType** (str) - (Required) 计费类型。Year,Month,Dynamic,默认返回全部计费方式对应的价格
- **UHostId** (str) - (Required) UHost实例ID

**Response**

- **PriceSet** (list) - 见 **BasePriceSet** 模型定义

**Response Model**

**BasePriceSet**
- **ChargeType** (str) - 计费类型
- **OriginalPrice** (float) - 限时优惠的折前原价(即列表价乘以商务折扣后的单价)。
- **Price** (float) - 价格,单位: 元,保留小数点后两位有效数字


"""
# build request
d = {
"ProjectId": self.config.project_id,
"Region": self.config.region,
}
req and d.update(req)
d = apis.GetUHostRenewPriceRequestSchema().dumps(d)

resp = self.invoke("GetUHostRenewPrice", d, **kwargs)
return apis.GetUHostRenewPriceResponseSchema().loads(resp)

def get_uhost_upgrade_price(
self, req: typing.Optional[dict] = None, **kwargs
) -> dict:
Expand Down
28 changes: 28 additions & 0 deletions ucloud/services/uhost/schemas/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,34 @@ class GetUHostInstanceVncInfoResponseSchema(schema.ResponseSchema):
}


"""
API: GetUHostRenewPrice

获取主机续费价格
"""


class GetUHostRenewPriceRequestSchema(schema.RequestSchema):
"""GetUHostRenewPrice - 获取主机续费价格"""

fields = {
"ChargeType": fields.Str(required=True, dump_to="ChargeType"),
"ProjectId": fields.Str(required=False, dump_to="ProjectId"),
"Region": fields.Str(required=True, dump_to="Region"),
"UHostId": fields.Str(required=True, dump_to="UHostId"),
}


class GetUHostRenewPriceResponseSchema(schema.ResponseSchema):
"""GetUHostRenewPrice - 获取主机续费价格"""

fields = {
"PriceSet": fields.List(
models.BasePriceSetSchema(), required=False, load_from="PriceSet"
),
}


"""
API: GetUHostUpgradePrice

Expand Down
30 changes: 21 additions & 9 deletions ucloud/services/uhost/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,6 @@ class BootDiskInfoSchema(schema.ResponseSchema):
}


class PerformanceSchema(schema.ResponseSchema):
"""Performance - GPU的性能指标"""

fields = {
"Rate": fields.Int(required=False, load_from="Rate"),
"Value": fields.Float(required=False, load_from="Value"),
}


class MachineSizesSchema(schema.ResponseSchema):
"""MachineSizes - GPU、CPU和内存信息"""

Expand Down Expand Up @@ -118,6 +109,15 @@ class CpuPlatformsSchema(schema.ResponseSchema):
}


class PerformanceSchema(schema.ResponseSchema):
"""Performance - GPU的性能指标"""

fields = {
"Rate": fields.Int(required=False, load_from="Rate"),
"Value": fields.Float(required=False, load_from="Value"),
}


class AvailableInstanceTypesSchema(schema.ResponseSchema):
"""AvailableInstanceTypes - https://ushare.ucloudadmin.com/pages/viewpage.action?pageId=104662646"""

Expand Down Expand Up @@ -343,3 +343,15 @@ class UHostPriceSetSchema(schema.ResponseSchema):
"Price": fields.Float(required=True, load_from="Price"),
"PriceDetail": PriceDetailSchema(),
}


class BasePriceSetSchema(schema.ResponseSchema):
"""BasePriceSet - 价格信息"""

fields = {
"ChargeType": fields.Str(required=False, load_from="ChargeType"),
"OriginalPrice": fields.Float(
required=False, load_from="OriginalPrice"
),
"Price": fields.Float(required=False, load_from="Price"),
}
Loading