Skip to content

sdk: rolling update for 0.11.63 #267

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
Sep 23, 2024
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
78 changes: 39 additions & 39 deletions ucloud/services/uhost/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ 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 @@ -109,15 +118,6 @@ 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 @@ -189,19 +189,23 @@ class IsolationGroupSchema(schema.ResponseSchema):
}


class UHostDiskSetSchema(schema.ResponseSchema):
"""UHostDiskSet - DescribeUHostInstance"""
class UHostIPSetSchema(schema.ResponseSchema):
"""UHostIPSet - DescribeUHostInstance"""

fields = {
"BackupType": fields.Str(required=False, load_from="BackupType"),
"DiskId": fields.Str(required=False, load_from="DiskId"),
"DiskType": fields.Str(required=True, load_from="DiskType"),
"Drive": fields.Str(required=False, load_from="Drive"),
"Encrypted": fields.Str(required=False, load_from="Encrypted"),
"IsBoot": fields.Str(required=True, load_from="IsBoot"),
"Name": fields.Str(required=False, load_from="Name"),
"Size": fields.Int(required=False, load_from="Size"),
"Bandwidth": fields.Int(required=False, load_from="Bandwidth"),
"Default": fields.Str(required=False, load_from="Default"),
"IP": fields.Str(required=False, load_from="IP"),
"IPId": fields.Str(required=False, load_from="IPId"),
"IPMode": fields.Str(required=True, load_from="IPMode"),
"Mac": fields.Str(required=False, load_from="Mac"),
"NetworkInterfaceId": fields.Str(
required=False, load_from="NetworkInterfaceId"
),
"SubnetId": fields.Str(required=False, load_from="SubnetId"),
"Type": fields.Str(required=False, load_from="Type"),
"VPCId": fields.Str(required=False, load_from="VPCId"),
"Weight": fields.Int(required=False, load_from="Weight"),
}


Expand All @@ -214,13 +218,19 @@ class UHostKeyPairSchema(schema.ResponseSchema):
}


class UDSetUDHostAttributeSchema(schema.ResponseSchema):
"""UDSetUDHostAttribute - 私有专区对应的宿主机属性"""
class UHostDiskSetSchema(schema.ResponseSchema):
"""UHostDiskSet - DescribeUHostInstance"""

fields = {
"HostBinding": fields.Bool(required=False, load_from="HostBinding"),
"UDHostId": fields.Str(required=False, load_from="UDHostId"),
"UDSetId": fields.Str(required=False, load_from="UDSetId"),
"BackupType": fields.Str(required=False, load_from="BackupType"),
"DiskId": fields.Str(required=False, load_from="DiskId"),
"DiskType": fields.Str(required=True, load_from="DiskType"),
"Drive": fields.Str(required=False, load_from="Drive"),
"Encrypted": fields.Str(required=False, load_from="Encrypted"),
"IsBoot": fields.Str(required=True, load_from="IsBoot"),
"Name": fields.Str(required=False, load_from="Name"),
"Size": fields.Int(required=False, load_from="Size"),
"Type": fields.Str(required=False, load_from="Type"),
}


Expand All @@ -232,23 +242,13 @@ class SpotAttributeSchema(schema.ResponseSchema):
}


class UHostIPSetSchema(schema.ResponseSchema):
"""UHostIPSet - DescribeUHostInstance"""
class UDSetUDHostAttributeSchema(schema.ResponseSchema):
"""UDSetUDHostAttribute - 私有专区对应的宿主机属性"""

fields = {
"Bandwidth": fields.Int(required=False, load_from="Bandwidth"),
"Default": fields.Str(required=False, load_from="Default"),
"IP": fields.Str(required=False, load_from="IP"),
"IPId": fields.Str(required=False, load_from="IPId"),
"IPMode": fields.Str(required=True, load_from="IPMode"),
"Mac": fields.Str(required=False, load_from="Mac"),
"NetworkInterfaceId": fields.Str(
required=False, load_from="NetworkInterfaceId"
),
"SubnetId": fields.Str(required=False, load_from="SubnetId"),
"Type": fields.Str(required=False, load_from="Type"),
"VPCId": fields.Str(required=False, load_from="VPCId"),
"Weight": fields.Int(required=False, load_from="Weight"),
"HostBinding": fields.Bool(required=False, load_from="HostBinding"),
"UDHostId": fields.Str(required=False, load_from="UDHostId"),
"UDSetId": fields.Str(required=False, load_from="UDSetId"),
}


Expand Down
6 changes: 5 additions & 1 deletion ucloud/services/umem/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,16 +656,20 @@ def describe_umem_block_info(
**Response**

- **DataSet** (list) - 见 **UMemBlockInfo** 模型定义
- **ReadMode** (str) - 集群读写分离策略。 枚举值[ "Custom": 用户自定义节点权重, "Uniform": 包括主节点在内的所有节点平均读请求, "ReadOnly": 读请求均分至只读节点]

**Response Model**

**UMemBlockInfo**
- **BlockId** (str) - 分片id
- **BlockName** (str) - 分片名称
- **BlockPort** (int) - 分片端口
- **BlockReadWeight** (int) - 分片读权重
- **BlockSize** (int) - 容量单位GB
- **BlockSlotBegin** (int) - 分片维护的键槽起始值
- **BlockSlotEnd** (int) - 分片维护的键槽结束值
- **BlockState** (str) - 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 SetPasswordFail //设置密码失败
- **BlockState** (str) - 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 SetPasswordFail //设置密码失败UpgradeMemInit //任务初始化
- **BlockType** (str) - 分片类型,master 或者 slave
- **BlockUsedSize** (int) - 使用量单位MB
- **BlockVip** (str) - 分片ip

Expand Down
1 change: 1 addition & 0 deletions ucloud/services/umem/schemas/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ class DescribeUMemBlockInfoResponseSchema(schema.ResponseSchema):
"DataSet": fields.List(
models.UMemBlockInfoSchema(), required=False, load_from="DataSet"
),
"ReadMode": fields.Str(required=False, load_from="ReadMode"),
}


Expand Down
5 changes: 5 additions & 0 deletions ucloud/services/umem/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,16 @@ class UMemBlockInfoSchema(schema.ResponseSchema):

fields = {
"BlockId": fields.Str(required=True, load_from="BlockId"),
"BlockName": fields.Str(required=False, load_from="BlockName"),
"BlockPort": fields.Int(required=True, load_from="BlockPort"),
"BlockReadWeight": fields.Int(
required=False, load_from="BlockReadWeight"
),
"BlockSize": fields.Int(required=True, load_from="BlockSize"),
"BlockSlotBegin": fields.Int(required=True, load_from="BlockSlotBegin"),
"BlockSlotEnd": fields.Int(required=True, load_from="BlockSlotEnd"),
"BlockState": fields.Str(required=True, load_from="BlockState"),
"BlockType": fields.Str(required=False, load_from="BlockType"),
"BlockUsedSize": fields.Int(required=False, load_from="BlockUsedSize"),
"BlockVip": fields.Str(required=False, load_from="BlockVip"),
}
Expand Down
32 changes: 16 additions & 16 deletions ucloud/services/unet/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@ class UnetBandwidthUsageEIPSetSchema(schema.ResponseSchema):
}


class ShareBandwidthSetSchema(schema.ResponseSchema):
"""ShareBandwidthSet - DescribeEIP"""

fields = {
"ShareBandwidth": fields.Int(
required=False, load_from="ShareBandwidth"
),
"ShareBandwidthId": fields.Str(
required=False, load_from="ShareBandwidthId"
),
"ShareBandwidthName": fields.Str(
required=False, load_from="ShareBandwidthName"
),
}


class UnetEIPResourceSetSchema(schema.ResponseSchema):
"""UnetEIPResourceSet - DescribeEIP"""

Expand Down Expand Up @@ -86,22 +102,6 @@ class EIPBindingSchema(schema.ResponseSchema):
}


class ShareBandwidthSetSchema(schema.ResponseSchema):
"""ShareBandwidthSet - DescribeEIP"""

fields = {
"ShareBandwidth": fields.Int(
required=False, load_from="ShareBandwidth"
),
"ShareBandwidthId": fields.Str(
required=False, load_from="ShareBandwidthId"
),
"ShareBandwidthName": fields.Str(
required=False, load_from="ShareBandwidthName"
),
}


class UnetEIPSetSchema(schema.ResponseSchema):
"""UnetEIPSet - DescribeEIP"""

Expand Down
50 changes: 25 additions & 25 deletions ucloud/services/usms/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,31 @@ class ReceiptPerSessionSchema(schema.ResponseSchema):
}


class StatisticsDataSchema(schema.ResponseSchema):
"""StatisticsData - 统计信息"""

fields = {
"FailCostCount": fields.Int(required=True, load_from="FailCostCount"),
"FailCount": fields.Int(required=True, load_from="FailCount"),
"SendCostCount": fields.Int(required=True, load_from="SendCostCount"),
"SendCount": fields.Int(required=True, load_from="SendCount"),
"SubmitFailCostCount": fields.Int(
required=True, load_from="SubmitFailCostCount"
),
"SubmitFailCount": fields.Int(
required=True, load_from="SubmitFailCount"
),
"SuccessCostCount": fields.Int(
required=True, load_from="SuccessCostCount"
),
"SuccessCount": fields.Int(required=True, load_from="SuccessCount"),
"UnknownCostCount": fields.Int(
required=True, load_from="UnknownCostCount"
),
"UnknownCount": fields.Int(required=True, load_from="UnknownCount"),
}


class StatisticsDataInfoSchema(schema.ResponseSchema):
"""StatisticsDataInfo - 统计信息按天聚合"""

Expand Down Expand Up @@ -57,31 +82,6 @@ class StatisticsDataInfoSchema(schema.ResponseSchema):
}


class StatisticsDataSchema(schema.ResponseSchema):
"""StatisticsData - 统计信息"""

fields = {
"FailCostCount": fields.Int(required=True, load_from="FailCostCount"),
"FailCount": fields.Int(required=True, load_from="FailCount"),
"SendCostCount": fields.Int(required=True, load_from="SendCostCount"),
"SendCount": fields.Int(required=True, load_from="SendCount"),
"SubmitFailCostCount": fields.Int(
required=True, load_from="SubmitFailCostCount"
),
"SubmitFailCount": fields.Int(
required=True, load_from="SubmitFailCount"
),
"SuccessCostCount": fields.Int(
required=True, load_from="SuccessCostCount"
),
"SuccessCount": fields.Int(required=True, load_from="SuccessCount"),
"UnknownCostCount": fields.Int(
required=True, load_from="UnknownCostCount"
),
"UnknownCount": fields.Int(required=True, load_from="UnknownCount"),
}


class OutSignatureSchema(schema.ResponseSchema):
"""OutSignature - 短信签名"""

Expand Down
2 changes: 1 addition & 1 deletion ucloud/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "0.11.62"
version = "0.11.63"