Skip to content
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

sdk: rolling update for 0.11.61 #265

Merged
merged 1 commit into from
Sep 2, 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
3 changes: 2 additions & 1 deletion ucloud/services/udb/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ def create_udb_instance(
- **DBSubVersion** (str) - mysql小版本号,支持指定小版本创建
- **DisableSemisync** (bool) - 是否开启异步高可用,默认不填,可置为true
- **InstanceMode** (str) - UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal"
- **InstanceType** (str) - UDB数据库机型: "SATA_SSD": "SSD机型" , "PCIE_SSD": "SSD高性能机型" , "Normal_Volume": "标准大容量机型", "SATA_SSD_Volume": "SSD大容量机型" , "PCIE_SSD_Volume": "SSD高性能大容量机型", "NVMe_SSD": "快杰机型"
- **MachineType** (str) - 规格类型ID,当SpecificationType为1时有效
- **MemoryLimit** (int) - 内存限制(MB),目前支持以下几档 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M
- **Quantity** (int) - 购买时长,默认值1
Expand Down Expand Up @@ -777,7 +778,7 @@ def describe_mongo_db_sharded_cluster(
- **ReplicationDelaySeconds** (int) -
- **Role** (str) -
- **SSDType** (str) -
- **SpecificationType** (str) -
- **SpecificationType** (int) -
- **SrcDBId** (str) -
- **State** (str) -
- **SubnetId** (str) -
Expand Down
4 changes: 1 addition & 3 deletions ucloud/services/udb/schemas/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,7 @@ class CreateUDBInstanceRequestSchema(schema.RequestSchema):
required=False, dump_to="HAArch"
), # Deprecated, will be removed at 1.0
"InstanceMode": fields.Str(required=False, dump_to="InstanceMode"),
"InstanceType": fields.Str(
required=False, dump_to="InstanceType"
), # Deprecated, will be removed at 1.0
"InstanceType": fields.Str(required=False, dump_to="InstanceType"),
"MachineType": fields.Str(required=False, dump_to="MachineType"),
"MemoryLimit": fields.Int(required=False, dump_to="MemoryLimit"),
"Name": fields.Str(required=True, dump_to="Name"),
Expand Down
18 changes: 9 additions & 9 deletions ucloud/services/udb/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
from ucloud.core.typesystem import schema, fields


class UFileDataSetSchema(schema.ResponseSchema):
"""UFileDataSet - 增加ufile的描述"""

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


class UDBSlaveInstanceSetSchema(schema.ResponseSchema):
"""UDBSlaveInstanceSet - DescribeUDBSlaveInstance"""

Expand Down Expand Up @@ -78,6 +69,15 @@ class UDBSlaveInstanceSetSchema(schema.ResponseSchema):
}


class UFileDataSetSchema(schema.ResponseSchema):
"""UFileDataSet - 增加ufile的描述"""

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


class MongoDBShardedClusterSetSchema(schema.ResponseSchema):
"""MongoDBShardedClusterSet -"""

Expand Down
3 changes: 3 additions & 0 deletions ucloud/services/uhost/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ def create_custom_image(
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
- **ImageName** (str) - (Required) 镜像名称
- **UHostId** (str) - (Required) UHost实例ID 参见 `DescribeUHostInstance <https://docs.ucloud.cn/api/uhost-api/describe_uhost_instance.html>`_
- **DataUDiskIds** (list) - 【数组】关联的云盘数据盘id列表。注意: 云盘数据盘需要开启快照服务
- **ImageDescription** (str) - 镜像描述
- **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_

**Response**

- **DataSnapshotIds** (list) - 云盘数据盘快照id列表
- **ImageId** (str) - 镜像Id

"""
Expand Down Expand Up @@ -459,6 +461,7 @@ def describe_image(

**UHostImageSet**
- **CreateTime** (int) - 创建时间,格式为Unix时间戳
- **DataSnapshotIds** (list) - 关联的云盘数据盘快照Id列表
- **Features** (list) - 特殊状态标识,目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra(网络增强2.0), NetEnhanced_Extreme(网络增强3.0), HotPlug(热升级), GPU(GPU镜像),CloudInit, IPv6(支持IPv6网络),RssdAttachable(支持RSSD云盘),Vgpu_AMD(支持AMD的vgpu),Vgpu_NVIDIA(支持NVIDIA的vgpu),Aarch64_Type(支持arm64架构)
- **FuncType** (str) - 镜像归属,枚举值:["gpu","app","uhost"]。"gpu": 对gpu进行处理过的行业镜像;"app":轻量云主机专用的镜像;"uhost":云主机镜像市场的行业镜像
- **ImageDescription** (str) - 镜像描述
Expand Down
4 changes: 4 additions & 0 deletions ucloud/services/uhost/schemas/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class CreateCustomImageRequestSchema(schema.RequestSchema):
"""CreateCustomImage - 从指定UHost实例,生成自定义镜像。"""

fields = {
"DataUDiskIds": fields.List(fields.Str()),
"ImageDescription": fields.Str(
required=False, dump_to="ImageDescription"
),
Expand All @@ -68,6 +69,9 @@ class CreateCustomImageResponseSchema(schema.ResponseSchema):
"""CreateCustomImage - 从指定UHost实例,生成自定义镜像。"""

fields = {
"DataSnapshotIds": fields.List(
fields.Str(), required=False, load_from="DataSnapshotIds"
),
"ImageId": fields.Str(required=False, load_from="ImageId"),
}

Expand Down
111 changes: 56 additions & 55 deletions ucloud/services/uhost/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,28 @@ class KeyPairSchema(schema.ResponseSchema):
}


class DataDiskInfoSchema(schema.ResponseSchema):
"""DataDiskInfo - 数据盘信息"""

fields = {
"Features": fields.List(fields.Str()),
"MaximalSize": fields.Int(required=False, load_from="MaximalSize"),
"MinimalSize": fields.Int(required=False, load_from="MinimalSize"),
"Name": fields.Str(required=False, load_from="Name"),
}


class BootDiskInfoSchema(schema.ResponseSchema):
"""BootDiskInfo - 系统盘信息"""

fields = {
"Features": fields.List(fields.Str()),
"InstantResize": fields.Bool(required=False, load_from="InstantResize"),
"MaximalSize": fields.Int(required=False, load_from="MaximalSize"),
"Name": fields.Str(required=False, load_from="Name"),
}


class CollectionSchema(schema.ResponseSchema):
"""Collection - CPU和内存可支持的规格"""

Expand All @@ -40,24 +62,21 @@ class FeatureModesSchema(schema.ResponseSchema):
}


class DataDiskInfoSchema(schema.ResponseSchema):
"""DataDiskInfo - 数据盘信息"""
class PerformanceSchema(schema.ResponseSchema):
"""Performance - GPU的性能指标"""

fields = {
"Features": fields.List(fields.Str()),
"MaximalSize": fields.Int(required=False, load_from="MaximalSize"),
"MinimalSize": fields.Int(required=False, load_from="MinimalSize"),
"Name": fields.Str(required=False, load_from="Name"),
"Rate": fields.Int(required=False, load_from="Rate"),
"Value": fields.Float(required=False, load_from="Value"),
}


class BootDiskInfoSchema(schema.ResponseSchema):
"""BootDiskInfo - 系统盘信息"""
class DisksSchema(schema.ResponseSchema):
"""Disks - 磁盘信息"""

fields = {
"Features": fields.List(fields.Str()),
"InstantResize": fields.Bool(required=False, load_from="InstantResize"),
"MaximalSize": fields.Int(required=False, load_from="MaximalSize"),
"BootDisk": fields.List(BootDiskInfoSchema()),
"DataDisk": fields.List(DataDiskInfoSchema()),
"Name": fields.Str(required=False, load_from="Name"),
}

Expand All @@ -80,15 +99,6 @@ class GraphicsMemorySchema(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 FeaturesSchema(schema.ResponseSchema):
"""Features - 虚机可支持的特性"""

Expand All @@ -98,16 +108,6 @@ class FeaturesSchema(schema.ResponseSchema):
}


class DisksSchema(schema.ResponseSchema):
"""Disks - 磁盘信息"""

fields = {
"BootDisk": fields.List(BootDiskInfoSchema()),
"DataDisk": fields.List(DataDiskInfoSchema()),
"Name": fields.Str(required=False, load_from="Name"),
}


class CpuPlatformsSchema(schema.ResponseSchema):
"""CpuPlatforms - CPU平台信息"""

Expand Down Expand Up @@ -140,6 +140,7 @@ class UHostImageSetSchema(schema.ResponseSchema):

fields = {
"CreateTime": fields.Int(required=False, load_from="CreateTime"),
"DataSnapshotIds": fields.List(fields.Str()),
"Features": fields.List(fields.Str()),
"FuncType": fields.Str(required=False, load_from="FuncType"),
"ImageDescription": fields.Str(
Expand Down Expand Up @@ -188,6 +189,22 @@ class IsolationGroupSchema(schema.ResponseSchema):
}


class UHostDiskSetSchema(schema.ResponseSchema):
"""UHostDiskSet - 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"),
"Type": fields.Str(required=False, load_from="Type"),
}


class SpotAttributeSchema(schema.ResponseSchema):
"""SpotAttribute - 竞价实例属性"""

Expand All @@ -196,6 +213,15 @@ class SpotAttributeSchema(schema.ResponseSchema):
}


class UHostKeyPairSchema(schema.ResponseSchema):
"""UHostKeyPair - 主机密钥信息"""

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


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

Expand Down Expand Up @@ -226,31 +252,6 @@ class UHostIPSetSchema(schema.ResponseSchema):
}


class UHostDiskSetSchema(schema.ResponseSchema):
"""UHostDiskSet - 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"),
"Type": fields.Str(required=False, load_from="Type"),
}


class UHostKeyPairSchema(schema.ResponseSchema):
"""UHostKeyPair - 主机密钥信息"""

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


class UHostInstanceSetSchema(schema.ResponseSchema):
"""UHostInstanceSet - DescribeUHostInstance"""

Expand Down
18 changes: 9 additions & 9 deletions ucloud/services/umem/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ class UDRedisSlowlogSetSchema(schema.ResponseSchema):
}


class UMemSpaceAddressSetSchema(schema.ResponseSchema):
"""UMemSpaceAddressSet - DescribeUMemSpace"""

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


class UMemSlaveDataSetSchema(schema.ResponseSchema):
"""UMemSlaveDataSet - DescribeUMem"""

Expand Down Expand Up @@ -64,6 +55,15 @@ class UMemSlaveDataSetSchema(schema.ResponseSchema):
}


class UMemSpaceAddressSetSchema(schema.ResponseSchema):
"""UMemSpaceAddressSet - DescribeUMemSpace"""

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


class UMemDataSetSchema(schema.ResponseSchema):
"""UMemDataSet - DescribeUMem"""

Expand Down
20 changes: 10 additions & 10 deletions ucloud/services/unet/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ class UnetEIPResourceSetSchema(schema.ResponseSchema):
}


class EIPBindingSchema(schema.ResponseSchema):
"""EIPBinding - EIP绑定内网IP关系数据"""

fields = {
"EIP": fields.Str(required=False, load_from="EIP"),
"PrivateIP": fields.Str(required=False, load_from="PrivateIP"),
"PrivateIPType": fields.Str(required=False, load_from="PrivateIPType"),
}


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

Expand All @@ -92,16 +102,6 @@ class ShareBandwidthSetSchema(schema.ResponseSchema):
}


class EIPBindingSchema(schema.ResponseSchema):
"""EIPBinding - EIP绑定内网IP关系数据"""

fields = {
"EIP": fields.Str(required=False, load_from="EIP"),
"PrivateIP": fields.Str(required=False, load_from="PrivateIP"),
"PrivateIPType": fields.Str(required=False, load_from="PrivateIPType"),
}


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

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.60"
version = "0.11.61"